startext.vim 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. " BIG THING THAT CHANGES YOUR START THING. Yeah don't put this. You have to
  2. " say to other people that have never used vim that you use vim! Also that you
  3. " support people in Uganda.
  4. fun! Start()
  5. " Don't run if: we have commandline arguments, we don't have an empty
  6. " buffer, if we've not invoked as vim or gvim, or if we'e start in insert mode
  7. if argc() || line2byte('$') != -1 || v:progname !~? '^[-gmnq]\=vim\=x\=\%[\.exe]$' || &insertmode
  8. return
  9. endif
  10. " Start a new buffer ...
  11. enew
  12. " ... and set some options for it
  13. setlocal
  14. \ bufhidden=wipe
  15. \ buftype=nofile
  16. \ nobuflisted
  17. \ nocursorcolumn
  18. \ nocursorline
  19. \ nolist
  20. \ nonumber
  21. \ noswapfile
  22. \ norelativenumber
  23. " Now we can just write to the buffer, whatever you want.
  24. call append('$', " oooo$$$$$$$$$$$$oooo")
  25. call append('$', " oo$$$$$$$$$$$$$$$$$$$$$$$$o")
  26. call append('$', " oo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o o$ $$ o$")
  27. call append('$', " o $ oo o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o $$ $$ $$o$")
  28. call append('$', " oo $ $ $$ o$$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$o $$$o$$o$")
  29. call append('$', " $$$$$$$o$ o$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$o $$$$$$$$")
  30. call append('$', " $$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$")
  31. call append('$', " $$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$$$$$$$$ $$$$$$$")
  32. call append('$', " $$$$oooo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$")
  33. call append('$', " $$$ o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$o")
  34. call append('$', " o$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$o")
  35. call append('$', " $$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$ooooo$$$$o")
  36. call append('$', " o$$$oooo$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ o$$$$$$$$$$$$$$$$$")
  37. call append('$', " $$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$ooooooooooooo")
  38. call append('$', " $$$$ $$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ o$$$")
  39. call append('$', " $$$$o $$$$$$$$$$$$$$$$$$$$$$$$$ $$$")
  40. call append('$', " $$$o $$$$$$$$$$$$$$$ o$$$")
  41. call append('$', " $$$$o o$$$$")
  42. call append('$', " $$$$$$ o$$$$$$o$$$$$o o$$$$")
  43. call append('$', " $$$$$$oo $$$$$$o$$$$$o o$$$$$")
  44. call append('$', " $$$$$$$oooo $$$$o$$$$$$$$$$$$")
  45. call append('$', " $$$$$$$$$oo $$$$$$$$$$")
  46. call append('$', " $$$$$$$$$$$$$$$")
  47. call append('$', " $$$$$$$$$$$$")
  48. call append('$', " $$$$$$$$$$$")
  49. call append('$', " $$$$$$$$")
  50. " call append('$', "Vim is extremely bloated. But I love it.")
  51. " call append('$', "Life questions:")
  52. " call append('$', "[--------------------------------------------------------]")
  53. " call append('$', "When will vim be my window manager?")
  54. " call append('$', "Why did I switch to a even more bloated version of vim called neovim?")
  55. " call append('$', "Will I get a job as a programmer?")
  56. " call append('$', "When will I will stop using windows?")
  57. " call append('$', "[--------------------------------------------------------]")
  58. " call append('$', " TEXT EDIT, have fun!")
  59. " call append('$', "[--------------------------------------------------------]")
  60. " call append('$', " TEXT EDIT, make stuff!")
  61. " call append('$', "[--------------------------------------------------------]")
  62. " call append('$', " TEXT EDIT, code stuff!")
  63. " call append('$', "[--------------------------------------------------------]")
  64. " call append('$', " TEXT EDIT, write stuff!")
  65. " call append('$', "[--------------------------------------------------------]")
  66. " call append('$', " TEXT EDIT, config stuff!")
  67. " call append('$', "[--------------------------------------------------------]")
  68. " call append('$', " Last but not least, have FUN!")
  69. " call append('$', "[--------------------------------------------------------]")
  70. " call append('$', " Commonly used vim answers:")
  71. " call append('$', " How do I quit Vim?")
  72. " call append('$', " In order to quit vim RTFM")
  73. " call append('$', " Type :q OR type ZZ")
  74. " No modifications to this buffer
  75. setlocal nomodifiable nomodified
  76. " When we go to insert mode start a new buffer, and start insert
  77. nnoremap <buffer><silent> e :enew<CR>
  78. nnoremap <buffer><silent> i :enew <bar> startinsert<CR>
  79. nnoremap <buffer><silent> o :enew <bar> startinsert<CR>
  80. endfun
  81. " Run after "doing all the startup stuff"
  82. autocmd VimEnter * call Start()