startify.txt 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. *startify.txt* Showing recently used files like a boss.
  2. *startify*
  3. __ __ ___
  4. /\ \__ /\ \__ __ /'___\
  5. ____\ \ ,_\ __ _ __\ \ ,_\/\_\/\ \__/ __ __
  6. /',__\\ \ \/ /'__`\ /\`'__\ \ \/\/\ \ \ ,__\/\ \/\ \
  7. /\__, `\\ \ \_/\ \L\.\_\ \ \/ \ \ \_\ \ \ \ \_/\ \ \_\ \
  8. \/\____/ \ \__\ \__/.\_\\ \_\ \ \__\\ \_\ \_\ \/`____ \
  9. \/___/ \/__/\/__/\/_/ \/_/ \/__/ \/_/\/_/ `/___/> \
  10. /\___/
  11. \/__/
  12. ==============================================================================
  13. CONTENTS *startify-contents*
  14. 1.Intro..........................................|startify-intro|
  15. 2.Usage..........................................|startify-usage|
  16. 3.Options........................................|startify-options|
  17. 4.Commands.......................................|startify-commands|
  18. 5.Colors.........................................|startify-colors|
  19. 6.FAQ............................................|startify-faq|
  20. 7.Author.........................................|startify-author|
  21. 8.License........................................|startify-license|
  22. ==============================================================================
  23. 1. Intro *startify-intro*
  24. Startify is a zero-conf plugin which shows recently used files, bookmarks and
  25. sessions that were saved to a certain directory.
  26. ==============================================================================
  27. 2. Usage *startify-usage*
  28. Startify basically provides two things:
  29. 1) If you start Vim without giving any filenames to it (or pipe stuff to it so
  30. it reads from STDIN), startify will show a small but pretty start screen
  31. which shows recently used files (using viminfo) and sessions by default.
  32. Additionally, you can define bookmarks, thus entries for files that always
  33. should be available in the start screen.
  34. You can either navigate to a certain menu entry and hit enter or you just
  35. key in whatever is written between the square brackets on that line. You
  36. can even double-click anywhere on the line now.
  37. Per default the startify buffer gets closed automatically, if an entry was
  38. selected.
  39. You can reopen the screen via :Startify.
  40. Moreover, 'e' creates an empty buffer, 'i' creates an empty buffers and
  41. jumps into insert mode, 'q' quits.
  42. 2) It eases handling of loading and saving sessions by only working with a
  43. certain directory. Two commands are used for convenience:
  44. :SLoad load a session
  45. :SSave save a session
  46. The default settings are pretty sane, so it should work without any
  47. configuration.
  48. ==============================================================================
  49. 3. Options *startify-options*
  50. Put these variables into your vimrc. The shown assignments are also the
  51. default values.
  52. ============-
  53. let g:startify_empty_buffer_key = ''
  54. This creates an additional, hidden mapping for the empty buffer.
  55. Example: let g:startify_empty_buffer_key = 'o'
  56. ============-
  57. let g:startify_session_dir = '~/.vim/session'
  58. The directory to save/load sessions to/from.
  59. The default for Windows systems is '$HOME\vimfiles\session'.
  60. ============-
  61. let g:startify_show_sessions = 1
  62. List saved sessions in g:startify_session_dir.
  63. ============-
  64. let g:startify_show_files = 1
  65. List recently used files using viminfo.
  66. ============-
  67. let g:startify_show_files_number = 10
  68. The amount of files to list.
  69. ============-
  70. let g:startify_bookmarks = []
  71. A list of files to bookmark. Those files will always be shown at the bottom of
  72. the start screen.
  73. Example: let g:startify_bookmarks = [ '~/.vimrc' ]
  74. ============-
  75. let g:startify_skiplist = []
  76. A list of Vim regular expressions to filter recently used files.
  77. Example: let g:startify_skiplist = [
  78. \ 'COMMIT_EDITMSG',
  79. \ $VIMRUNTIME .'/doc',
  80. \ 'bundle/.*/doc'
  81. \ ]
  82. ============-
  83. let g:startify_skiplist_server = []
  84. Do not create the startify buffer, if this is a Vim server instance with a
  85. name contained in this list.
  86. Example: let g:startify_skiplist_server = [ 'GVIM' ]
  87. ============-
  88. let g:startify_custom_indices = []
  89. Use any list of strings as custom indices instead of increasing numbers. If
  90. there are more paths to fill in the startify buffer than actual items in the
  91. custom list, the rest will be filled up using the default numbering scheme
  92. starting from 0.
  93. NOTE: There is no sanitizing going on, so you should know what you do!
  94. E.g. you don't want to use duplicates. Same for 'e', 'i', 'q'. Actually you
  95. can use them, but they would be overwritten by mappings for creating the empty
  96. buffer and quitting. You may want to keep 'j' and 'k', too.
  97. Example: let g:startify_custom_indices = ['a','s','d','f']
  98. This would result in:
  99. [a] /last/recently/used/file1
  100. [s] /last/recently/used/file2
  101. [d] /last/recently/used/file3
  102. [f] /last/recently/used/file4
  103. [0] /last/recently/used/file5
  104. [1] /last/recently/used/file6
  105. etc.
  106. ============-
  107. let g:startify_unlisted_buffer = 1
  108. Some bad plugins like minibufexpl break, when there is no listed buffer.
  109. People can set this variable to 0, to work around that. As a consequence the
  110. start screen buffer won't be removed, even after triggering an action from the
  111. start screen.
  112. ============-
  113. let g:startify_enable_special = 1
  114. Don't show <empty buffer> and <quit>.
  115. ==============================================================================
  116. 4. Commands *startify-commands*
  117. :SLoad load a session
  118. :SSave save a session
  119. These take either 0 or 1 argument. If you don't specify the session name as an
  120. argument, they will just ask for it.
  121. Providing only a part of the session name works too, if you complete the
  122. argument with either <c-d> or <tab> afterwards.
  123. :Startify
  124. Open the startify buffer.
  125. ==============================================================================
  126. 5. Colors *startify-colors*
  127. You can overwrite the highlight groups used by startify. The plugins defines
  128. these groups:
  129. StartifyBracket [,]
  130. StartifyFile the actual file
  131. StartifyNumber the numbers between []
  132. StartifyPath the path to a file
  133. StartifySlash slashes in paths
  134. StartifySpecial <empty buffer>,<quit>
  135. Example: (my terminal emulator supports 256 colors)
  136. hi StartifyBracket ctermfg=240
  137. hi StartifyNumber ctermfg=215
  138. hi StartifyPath ctermfg=245
  139. hi StartifySlash ctermfg=240
  140. ==============================================================================
  141. 6. FAQ (Or: Typical rants) *startify-faq*
  142. "I don't want the start screen to use cursorline!"
  143. --------------------------------------------------
  144. Startify sets its own filetype "startify". Thus one could set buffer-local
  145. options like this:
  146. autocmd FileType startify setlocal nocursorline
  147. "Last recently used files don't seem to get updated at :Startify!"
  148. -----------------------------------------------------------
  149. It's because Vim loads the list from viminfo only once, at startup.
  150. "I use iTerm2 and have broken colors when using sessions!"
  151. ----------------------------------------------------------
  152. Nothing this plugin could do about. Try playing around with 'sessionoptions'.
  153. Some people swear it works for them with these settings:
  154. set sessionoptions=blank,curdir,folds,help,tabpages,winpos
  155. ==============================================================================
  156. 7. About the author *startify-author*
  157. My nick on Freenode IRC is mhi^.
  158. For latest developments: https://github.com/mhinz
  159. If you use any of my plugins, star it on github. This is a great way of
  160. getting feedback! Same for issues or feature requests.
  161. Thank you for flying mhi airlines. Get the Vim on!
  162. ==============================================================================
  163. 8. License *startify-license*
  164. Copyright © Marco Hinz. Distributed under the same terms as Vim itself.
  165. See |license|.
  166. vim: tw=78