2016-03-14 14:29:20 +00:00
|
|
|
*startify.txt* The fancy start screen.
|
2013-04-24 05:53:33 +00:00
|
|
|
*startify*
|
|
|
|
__ __ ___
|
|
|
|
/\ \__ /\ \__ __ /'___\
|
|
|
|
____\ \ ,_\ __ _ __\ \ ,_\/\_\/\ \__/ __ __
|
|
|
|
/',__\\ \ \/ /'__`\ /\`'__\ \ \/\/\ \ \ ,__\/\ \/\ \
|
|
|
|
/\__, `\\ \ \_/\ \L\.\_\ \ \/ \ \ \_\ \ \ \ \_/\ \ \_\ \
|
|
|
|
\/\____/ \ \__\ \__/.\_\\ \_\ \ \__\\ \_\ \_\ \/`____ \
|
|
|
|
\/___/ \/__/\/__/\/_/ \/_/ \/__/ \/_/\/_/ `/___/> \
|
|
|
|
/\___/
|
|
|
|
\/__/
|
2013-10-10 15:47:42 +00:00
|
|
|
by Marco Hinz~
|
|
|
|
>
|
|
|
|
If you use any of my plugins, please star them on github. It's a great way
|
|
|
|
of getting feedback and gives me the kick to put more time into their
|
|
|
|
development.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
If you encounter any bugs or have feature requests, just open an issue
|
|
|
|
report on Github.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Thank you for flying mhi^ airlines. Get the Vim on!
|
|
|
|
<
|
2013-04-24 05:53:33 +00:00
|
|
|
==============================================================================
|
|
|
|
CONTENTS *startify-contents*
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
INTRO .......................................... |startify-intro|
|
|
|
|
USAGE .......................................... |startify-usage|
|
|
|
|
OPTIONS ........................................ |startify-options|
|
2014-09-11 15:50:01 +00:00
|
|
|
AUTOCMD ........................................ |startify-autocmd|
|
2013-10-10 15:47:42 +00:00
|
|
|
COMMANDS ....................................... |startify-commands|
|
2013-10-22 15:25:03 +00:00
|
|
|
MAPPINGS ....................................... |startify-mappings|
|
2013-10-10 15:47:42 +00:00
|
|
|
COLORS ......................................... |startify-colors|
|
|
|
|
FAQ ............................................ |startify-faq|
|
2013-10-22 19:32:08 +00:00
|
|
|
EXAMPLE ........................................ |startify-example|
|
2013-04-24 05:53:33 +00:00
|
|
|
|
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
INTRO *startify-intro*
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2016-05-31 21:32:51 +00:00
|
|
|
Startify is a plugin that shows recently used files, bookmarks, commands and
|
|
|
|
sessions that were saved to a certain directory.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
USAGE *startify-usage*
|
2013-04-24 05:53:33 +00:00
|
|
|
|
|
|
|
Startify basically provides two things:
|
|
|
|
|
|
|
|
1) If you start Vim without giving any filenames to it (or pipe stuff to it so
|
|
|
|
it reads from STDIN), startify will show a small but pretty start screen
|
2013-07-12 18:55:37 +00:00
|
|
|
that shows recently used files (using viminfo) and sessions by default.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2016-05-31 21:32:51 +00:00
|
|
|
Additionally, you can define bookmarks (thus entries for files) and
|
2016-05-29 09:06:52 +00:00
|
|
|
commands that always should be available on the start screen.
|
2013-04-24 08:42:35 +00:00
|
|
|
|
2013-04-25 07:33:07 +00:00
|
|
|
You can either navigate to a certain menu entry and hit enter or you just
|
2013-04-29 22:03:47 +00:00
|
|
|
key in whatever is written between the square brackets on that line. You
|
|
|
|
can even double-click anywhere on the line now.
|
2013-04-25 07:33:07 +00:00
|
|
|
|
2013-07-12 18:55:37 +00:00
|
|
|
In addition, 'e' creates an empty buffer, 'i' creates an empty buffer and
|
2013-05-31 10:51:58 +00:00
|
|
|
jumps into insert mode, 'q' quits.
|
2013-04-25 07:33:07 +00:00
|
|
|
|
2013-05-31 10:51:58 +00:00
|
|
|
Moreover, you can open several files at one go. Navigate to an entry and
|
2013-08-22 17:14:34 +00:00
|
|
|
hit either 'b' (open in same window), 's' (open in split), 'v' (open in
|
|
|
|
vertical split) or 't' (open in tab). You can do that for multiple entries.
|
|
|
|
You can also mix them. The order of the selections will be remembered.
|
|
|
|
Afterwards execute these actions via <cr>.
|
2013-04-24 06:06:47 +00:00
|
|
|
|
2013-05-31 10:51:58 +00:00
|
|
|
When the selection is finished, Startify will close automatically. You can
|
|
|
|
reopen the screen via :Startify.
|
2013-04-29 22:03:47 +00:00
|
|
|
|
2013-07-11 11:50:44 +00:00
|
|
|
And you can define your own custom ascii art header now!
|
|
|
|
|
2013-04-24 05:53:33 +00:00
|
|
|
2) It eases handling of loading and saving sessions by only working with a
|
2013-05-03 10:24:08 +00:00
|
|
|
certain directory. These commands are used for convenience:
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2016-02-02 13:54:58 +00:00
|
|
|
:SLoad load a session
|
|
|
|
:SSave save a session
|
|
|
|
:SDelete[!] delete a session
|
|
|
|
:SClose close a session
|
|
|
|
|
|
|
|
If ! is given, you won't get prompted.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
OPTIONS *startify-options*
|
2013-04-24 05:53:33 +00:00
|
|
|
|
|
|
|
Put these variables into your vimrc. The shown assignments are also the
|
|
|
|
default values.
|
|
|
|
|
2015-11-16 12:15:03 +00:00
|
|
|
Most used options:~
|
2013-08-13 13:26:06 +00:00
|
|
|
|g:startify_bookmarks|
|
|
|
|
|g:startify_change_to_dir|
|
2014-10-09 14:14:03 +00:00
|
|
|
|g:startify_change_to_vcs_root|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_custom_header|
|
2015-11-16 12:15:03 +00:00
|
|
|
|g:startify_enable_special|
|
|
|
|
|g:startify_list_order|
|
|
|
|
|g:startify_skiplist|
|
2016-03-07 12:21:16 +00:00
|
|
|
|g:startify_update_oldfiles|
|
2015-11-16 12:15:03 +00:00
|
|
|
|
|
|
|
Misc options:~
|
2016-05-31 21:32:51 +00:00
|
|
|
|g:startify_commands|
|
2015-11-16 12:15:03 +00:00
|
|
|
|g:startify_custom_footer|
|
2016-03-14 17:14:45 +00:00
|
|
|
|g:startify_custom_header_quotes|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_custom_indices|
|
2013-09-24 16:17:26 +00:00
|
|
|
|g:startify_disable_at_vimenter|
|
2015-03-06 15:11:19 +00:00
|
|
|
|g:startify_enable_unsafe|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_files_number|
|
2017-01-10 13:00:44 +00:00
|
|
|
|g:startify_fortune_use_unicode|
|
2016-11-27 01:43:22 +00:00
|
|
|
|g:startify_padding_left|
|
2017-01-10 13:00:44 +00:00
|
|
|
|g:startify_relative_path|
|
2015-11-16 12:15:03 +00:00
|
|
|
|g:startify_skiplist_server|
|
2016-02-12 13:21:05 +00:00
|
|
|
|g:startify_use_env|
|
2015-11-16 12:15:03 +00:00
|
|
|
|
|
|
|
Sessions:~
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_session_autoload|
|
2016-06-01 15:40:44 +00:00
|
|
|
|g:startify_session_before_save|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_session_delete_buffers|
|
|
|
|
|g:startify_session_dir|
|
2017-01-20 19:11:32 +00:00
|
|
|
|g:startify_session_number|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_session_persistence|
|
2015-05-12 09:22:06 +00:00
|
|
|
|g:startify_session_remove_lines|
|
2014-09-17 15:29:32 +00:00
|
|
|
|g:startify_session_savecmds|
|
|
|
|
|g:startify_session_savevars|
|
2016-06-01 15:23:56 +00:00
|
|
|
|g:startify_session_sort|
|
2013-08-13 13:26:06 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_dir*
|
|
|
|
>
|
2013-07-30 08:26:40 +00:00
|
|
|
let g:startify_session_dir = '~/.vim/session'
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-07-30 08:26:40 +00:00
|
|
|
The directory to save/load sessions to/from.
|
2013-04-27 07:57:11 +00:00
|
|
|
|
2013-07-30 08:26:40 +00:00
|
|
|
The default for Windows systems is '$HOME\vimfiles\session'.
|
2013-04-27 07:57:11 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_list_order*
|
|
|
|
>
|
2016-05-29 09:06:52 +00:00
|
|
|
let g:startify_list_order = ['files', 'dir', 'bookmarks', 'sessions',
|
2016-05-31 21:32:51 +00:00
|
|
|
\ 'commands']
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-10-22 11:51:38 +00:00
|
|
|
At the moment startify supports these lists:~
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-22 15:02:26 +00:00
|
|
|
1) "files"
|
2013-04-25 12:10:26 +00:00
|
|
|
|
2013-07-30 08:26:40 +00:00
|
|
|
This lists the most recently used files using viminfo. The number of files
|
2015-11-17 21:09:31 +00:00
|
|
|
is limited by |g:startify_files_number|.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-22 15:02:26 +00:00
|
|
|
2) "dir"
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-07-30 08:26:40 +00:00
|
|
|
This lists the files from the current directory sorted by modification
|
2015-11-17 21:09:31 +00:00
|
|
|
time. The number of files is limited by |g:startify_files_number|.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-22 15:02:26 +00:00
|
|
|
3) "bookmarks"
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2013-10-22 11:51:38 +00:00
|
|
|
This lists bookmarks, thus hardcoded files or directories that will always
|
2015-11-17 21:09:31 +00:00
|
|
|
be shown. Have a look at |g:startify_bookmarks|.
|
2013-07-30 08:26:40 +00:00
|
|
|
|
2013-10-22 15:02:26 +00:00
|
|
|
4) "sessions"
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2015-11-17 21:09:31 +00:00
|
|
|
This lists all the sessions saved in the directory |g:startify_session_dir|.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2016-05-31 21:32:51 +00:00
|
|
|
5) "commands"
|
2016-05-29 09:06:52 +00:00
|
|
|
|
2016-05-31 21:32:51 +00:00
|
|
|
This lists commands defined in |g:startify_commands|.
|
2016-05-29 09:06:52 +00:00
|
|
|
|
2013-10-22 11:51:38 +00:00
|
|
|
Section headers:~
|
|
|
|
|
|
|
|
Additionally you can add lists of strings to that list. These will be shown
|
|
|
|
above the following item in |g:startify_list_order|.
|
|
|
|
|
|
|
|
NOTE: Section headers are context-senstive. This means that if the following
|
|
|
|
item is a startify list ("dir", "bookmarks", ...) and empty (no files in the
|
|
|
|
current directory, no bookmarks defined, ...), the section header won't be
|
|
|
|
shown as well.
|
|
|
|
|
2013-10-22 12:44:31 +00:00
|
|
|
NOTE: The section header use the StartifySection highlight group.
|
|
|
|
|
2013-10-22 11:51:38 +00:00
|
|
|
Section headers example:~
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2013-10-22 11:51:38 +00:00
|
|
|
let g:startify_list_order = [
|
2014-11-25 11:14:56 +00:00
|
|
|
\ [' My most recently', ' used files'],
|
2013-10-22 11:51:38 +00:00
|
|
|
\ 'files',
|
2014-11-25 11:14:56 +00:00
|
|
|
\ [' My most recently used files in the current directory:'],
|
2013-10-22 11:51:38 +00:00
|
|
|
\ 'dir',
|
|
|
|
\ [' These are my sessions:'],
|
|
|
|
\ 'sessions',
|
|
|
|
\ [' These are my bookmarks:'],
|
|
|
|
\ 'bookmarks',
|
2016-05-31 21:32:51 +00:00
|
|
|
\ [' These are my commands:'],
|
|
|
|
\ 'commands',
|
2013-10-22 11:51:38 +00:00
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-10-22 11:51:38 +00:00
|
|
|
Feel free to add some cool ASCII action!
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_bookmarks*
|
|
|
|
>
|
2013-07-30 08:26:40 +00:00
|
|
|
let g:startify_bookmarks = []
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2015-11-03 21:39:58 +00:00
|
|
|
A list of files or directories to bookmark. The list can contain two kinds of
|
|
|
|
types. Either a path or a dictionary whereas the key is the custom index and
|
|
|
|
the value the path.
|
2013-07-18 22:39:51 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
2016-03-11 10:02:29 +00:00
|
|
|
let g:startify_bookmarks = [ {'c': '~/.vimrc'}, '~/.zshrc' ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2016-03-11 10:02:29 +00:00
|
|
|
NOTE: Avoid using keys from |startify-mappings| if providing custom indices.
|
|
|
|
|
2016-05-29 09:06:52 +00:00
|
|
|
------------------------------------------------------------------------------
|
2016-05-31 21:32:51 +00:00
|
|
|
*g:startify_commands*
|
2016-05-29 09:06:52 +00:00
|
|
|
>
|
2016-05-31 21:32:51 +00:00
|
|
|
let g:startify_commands = []
|
2016-05-29 09:06:52 +00:00
|
|
|
<
|
2016-05-31 21:32:51 +00:00
|
|
|
A list of commands to execute on selection. Leading colons are optional. It
|
|
|
|
supports optional custom indices and/or command descriptions.
|
2016-05-29 09:06:52 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
>
|
2016-05-31 21:32:51 +00:00
|
|
|
let g:startify_commands = [
|
|
|
|
\ ':help reference',
|
|
|
|
\ ['Vim Reference', 'h ref'],
|
|
|
|
\ {'h': 'h ref'},
|
|
|
|
\ {'m': ['My magical function', 'call Magic()']},
|
|
|
|
\ ]
|
2016-05-29 09:06:52 +00:00
|
|
|
<
|
|
|
|
NOTE: Avoid using keys from |startify-mappings| if providing custom indices.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_files_number*
|
|
|
|
>
|
2013-07-30 08:26:40 +00:00
|
|
|
let g:startify_files_number = 10
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-07-30 08:26:40 +00:00
|
|
|
The number of files to list.
|
2013-04-24 05:53:33 +00:00
|
|
|
|
2016-03-07 12:21:16 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_update_oldfiles*
|
|
|
|
>
|
|
|
|
let g:startify_update_oldfiles = 0
|
|
|
|
<
|
|
|
|
Usually |v:oldfiles| only gets updated when Vim exits. Using this option updates
|
|
|
|
it on-the-fly, so that :Startify is always up-to-date.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_autoload*
|
|
|
|
>
|
2013-08-10 07:05:02 +00:00
|
|
|
let g:startify_session_autoload = 0
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2017-01-11 15:55:45 +00:00
|
|
|
If this option is enabled and you start Vim in a directory that contains a
|
|
|
|
`Session.vim`, that session will be loaded automatically. Otherwise it will be
|
|
|
|
shown as the top entry in the Startify buffer.
|
2013-08-10 07:05:02 +00:00
|
|
|
|
2017-01-11 15:55:45 +00:00
|
|
|
The same happens when you |:cd| to a directory that contains a `Session.vim`
|
|
|
|
and execute |:Startify|.
|
2015-01-14 10:46:16 +00:00
|
|
|
|
2017-01-11 15:55:45 +00:00
|
|
|
It also works if you open a bookmarked directory. See |g:startify_bookmarks|.
|
|
|
|
|
|
|
|
This is great way to create a portable project folder!
|
|
|
|
|
|
|
|
NOTE: This option is affected by |g:startify_session_delete_buffers|.
|
2013-08-08 15:53:40 +00:00
|
|
|
|
2016-06-01 15:40:44 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_before_save*
|
|
|
|
>
|
|
|
|
let g:startify_session_before_save = []
|
|
|
|
<
|
|
|
|
This is a list of commands to be executed before saving a session.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_session_before_save = [
|
|
|
|
\ 'echo "Cleaning up before saving.."',
|
|
|
|
\ 'silent! NERDTreeTabsClose'
|
|
|
|
\ ]
|
|
|
|
<
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_persistence*
|
|
|
|
>
|
2013-08-13 09:10:41 +00:00
|
|
|
let g:startify_session_persistence = 0
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2014-09-05 17:15:34 +00:00
|
|
|
Automatically update sessions in two cases:
|
|
|
|
|
|
|
|
1) Before leaving Vim
|
|
|
|
2) Before loading a new session via :SLoad
|
2013-08-13 09:10:41 +00:00
|
|
|
|
2014-06-11 10:14:21 +00:00
|
|
|
This also works for sessions started with:
|
|
|
|
>
|
|
|
|
vim -S mysession.vim
|
|
|
|
<
|
2014-02-20 14:30:59 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_delete_buffers*
|
|
|
|
>
|
2017-01-11 15:55:45 +00:00
|
|
|
let g:startify_session_delete_buffers = 1
|
2014-02-20 14:30:59 +00:00
|
|
|
<
|
2017-01-11 15:55:45 +00:00
|
|
|
Delete all listed buffers when loading or closing a session.
|
|
|
|
|
|
|
|
1. When using |startify-:SLoad|.
|
|
|
|
2. When using |startify-:SClose|.
|
|
|
|
3. When using |g:startify_session_autoload|.
|
|
|
|
4. When choosing a session from the Startify buffer.
|
2014-02-20 14:30:59 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_change_to_dir*
|
|
|
|
>
|
2013-07-30 08:26:40 +00:00
|
|
|
let g:startify_change_to_dir = 1
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-07-30 08:26:40 +00:00
|
|
|
When opening a file or bookmark, change to its directory.
|
2013-04-24 08:42:35 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_change_to_vcs_root*
|
|
|
|
>
|
2013-08-25 01:31:53 +00:00
|
|
|
let g:startify_change_to_vcs_root = 0
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-08-25 01:31:53 +00:00
|
|
|
When opening a file or bookmark, seek and change to the root directory of the
|
|
|
|
VCS (if there is one).
|
|
|
|
|
2013-08-31 19:34:10 +00:00
|
|
|
At the moment only git, hg, bzr and svn are supported.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_skiplist*
|
|
|
|
>
|
2014-09-09 11:46:44 +00:00
|
|
|
let g:startify_skiplist = [
|
|
|
|
\ 'COMMIT_EDITMSG',
|
2015-11-06 17:16:09 +00:00
|
|
|
\ escape(fnamemodify(resolve($VIMRUNTIME), ':p'), '\') .'doc',
|
2014-09-09 11:46:44 +00:00
|
|
|
\ 'bundle/.*/doc',
|
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2015-04-15 08:27:33 +00:00
|
|
|
A list of Vim regular expressions that is used to filter recently used files.
|
|
|
|
See |pattern.txt| for what patterns can be used.
|
|
|
|
|
2015-07-06 16:19:43 +00:00
|
|
|
NOTE: Due to the nature of patterns, you can't just use "~/mysecret" but have
|
|
|
|
to use "$HOME .'/mysecret.txt'". The former would do something entirely
|
|
|
|
different: |/\~|. When using backslashes as path separators, escape them.
|
|
|
|
Otherwise using "C:\this\vim\path\is\problematic" would not match what you
|
|
|
|
expect, since |/\v| is a pattern, too.
|
2013-04-25 12:10:26 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_skiplist = [
|
2014-09-09 11:46:44 +00:00
|
|
|
\ '\.vimgolf',
|
2013-11-12 15:30:47 +00:00
|
|
|
\ '^/tmp',
|
2014-09-09 11:46:44 +00:00
|
|
|
\ '/project/.*/documentation',
|
2015-07-06 16:19:43 +00:00
|
|
|
\ escape(fnamemodify($HOME, ':p'), '\') .'mysecret.txt',
|
2013-04-27 07:57:11 +00:00
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2017-01-10 13:00:44 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_fortune_use_unicode*
|
|
|
|
>
|
|
|
|
let g:startify_fortune_use_unicode = 0
|
|
|
|
<
|
|
|
|
By default, the fortune header uses ASCII characters, because they work for
|
|
|
|
everyone. If you set this option to 1 and your 'encoding' is "utf-8", Unicode
|
|
|
|
box-drawing characters will be used instead.
|
|
|
|
|
|
|
|
This is not the default, because users of East Asian languages often set
|
|
|
|
'ambiwidth' to "double" or make their terminal emulator treat characters of
|
|
|
|
ambiguous width as double width. Both would make the drawed box look funny.
|
|
|
|
|
|
|
|
For more information: http://unicode.org/reports/tr11
|
|
|
|
|
2016-11-27 01:43:22 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_padding_left*
|
|
|
|
>
|
|
|
|
let g:startify_padding_left = 3
|
|
|
|
<
|
|
|
|
The number of spaces used for left padding.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_skiplist_server*
|
|
|
|
>
|
2013-04-26 08:18:31 +00:00
|
|
|
let g:startify_skiplist_server = []
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-04-26 08:18:31 +00:00
|
|
|
Do not create the startify buffer, if this is a Vim server instance with a
|
|
|
|
name contained in this list.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_skiplist_server = [ 'GVIM' ]
|
|
|
|
<
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_enable_special*
|
|
|
|
>
|
2013-07-30 08:26:40 +00:00
|
|
|
let g:startify_enable_special = 1
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-07-30 08:26:40 +00:00
|
|
|
Show <empty buffer> and <quit>.
|
2015-03-06 15:11:19 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_enable_unsafe*
|
|
|
|
>
|
|
|
|
let g:startify_enable_unsafe = 0
|
|
|
|
<
|
|
|
|
Enable the option only in case you think Vim starts too slowly (because of
|
|
|
|
:Startify) or if you often edit files on remote filesystems.
|
|
|
|
|
|
|
|
It's called unsafe because it improves the time :Startify needs to execute by
|
|
|
|
reducing the amount of syscalls to the underlying operating system, but
|
|
|
|
sacrifices the precision of shown entries.
|
|
|
|
|
|
|
|
This could lead to inconsistences in the shown :Startify entries (e.g. the
|
|
|
|
same file could be shown twice, because one time file was opened via absolute
|
|
|
|
path and another time via symlink).
|
|
|
|
|
|
|
|
Currently this option does this:
|
|
|
|
|
|
|
|
- don't resolves symlinks (readlink(2))
|
|
|
|
- don't check every file if it's readable (stat(2))
|
|
|
|
- don't filter through the bookmark list
|
2013-07-30 08:26:40 +00:00
|
|
|
|
2015-05-12 09:22:06 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_remove_lines*
|
|
|
|
>
|
|
|
|
let g:startify_session_remove_lines = []
|
|
|
|
<
|
|
|
|
Lines matching any of the patterns in this list, will be removed from the
|
|
|
|
session file.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_session_remove_lines = ['setlocal', 'winheight']
|
|
|
|
<
|
|
|
|
Internally this simply does:
|
|
|
|
>
|
|
|
|
:global/setlocal/delete
|
|
|
|
:global/winheight/delete
|
|
|
|
<
|
|
|
|
So you can use any |pattern|.
|
|
|
|
|
|
|
|
NOTE: Take care not to mess up any expressions within the session file,
|
|
|
|
otherwise you'll probably get problems when trying to load it.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_savevars*
|
|
|
|
>
|
2013-09-24 15:29:23 +00:00
|
|
|
let g:startify_session_savevars = []
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-09-24 15:29:23 +00:00
|
|
|
Include a list of variables in here which you would like Startify to save into
|
|
|
|
the session file in addition to what Vim normally saves into the session file.
|
|
|
|
For example, Vim will not normally save all-lowercase global variables, which
|
|
|
|
are common for plugin settings. It may be advisable to include
|
|
|
|
|g:startify_session_savevars| and |g:startify_session_savecmds| into this list
|
|
|
|
so they are saved every time the session saves.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_session_savevars = [
|
2013-09-24 15:29:23 +00:00
|
|
|
\ 'g:startify_session_savevars',
|
|
|
|
\ 'g:startify_session_savecmds',
|
|
|
|
\ 'g:random_plugin_use_feature'
|
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_savecmds*
|
|
|
|
>
|
2013-09-24 15:29:23 +00:00
|
|
|
let g:startify_session_savecmds = []
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-09-24 15:29:23 +00:00
|
|
|
Include a list of cmdline commands which Vim will run upon loading the
|
|
|
|
session. This can be useful to set various things (other than variables,
|
|
|
|
|g:startify_session_savevars| above) which Vim may not normally save into the
|
|
|
|
session file, as well as run external commands upon loading a session.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_session_savecmds = [
|
2013-09-24 15:29:23 +00:00
|
|
|
\ 'silent !pdfreader ~/latexproject/main.pdf &'
|
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2017-01-20 19:11:32 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_number*
|
|
|
|
>
|
|
|
|
let g:startify_session_number = 999
|
|
|
|
<
|
|
|
|
The maximum number of sessions to display. Makes the most sense together with
|
|
|
|
|g:startify_session_sort|.
|
|
|
|
|
2016-06-01 15:23:56 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_session_sort*
|
|
|
|
>
|
|
|
|
let g:startify_session_sort = 0
|
|
|
|
<
|
|
|
|
Sort sessions by modification time (when the session files were written)
|
|
|
|
rather than alphabetically.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_custom_indices*
|
|
|
|
>
|
2013-04-30 11:32:30 +00:00
|
|
|
let g:startify_custom_indices = []
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-04-30 11:46:03 +00:00
|
|
|
Use any list of strings as indices instead of increasing numbers. If there are
|
|
|
|
more startify entries than actual items in the custom list, the remaining
|
|
|
|
entries will be filled using the default numbering scheme starting from 0.
|
2013-04-30 11:32:30 +00:00
|
|
|
|
2013-04-30 11:49:45 +00:00
|
|
|
Thus you can create your own indexing scheme that fits your keyboard layout.
|
|
|
|
You don't want to leave the home row, do you?!
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
Example:
|
|
|
|
>
|
|
|
|
let g:startify_custom_indices = ['f', 'g', 'h']
|
|
|
|
<
|
2013-04-30 11:32:30 +00:00
|
|
|
This would result in:
|
|
|
|
|
2014-11-25 11:14:56 +00:00
|
|
|
[f] /most/recently/used/file1
|
|
|
|
[g] /most/recently/used/file2
|
|
|
|
[h] /most/recently/used/file3
|
|
|
|
[0] /most/recently/used/file4
|
|
|
|
[1] /most/recently/used/file5
|
|
|
|
[2] /most/recently/used/file6
|
2013-04-30 11:32:30 +00:00
|
|
|
etc.
|
|
|
|
|
2014-06-11 10:35:01 +00:00
|
|
|
If you want numbers to start at 1 instead of 0, you could use this:
|
|
|
|
>
|
|
|
|
let g:startify_custom_indices = map(range(1,100), 'string(v:val)')
|
|
|
|
<
|
2013-04-30 11:43:07 +00:00
|
|
|
NOTE: There is no sanitizing going on, so you should know what you're doing!
|
2016-03-11 10:02:29 +00:00
|
|
|
Avoid using keys from |startify-mappings|.
|
2013-04-30 11:43:07 +00:00
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_custom_header*
|
|
|
|
>
|
2016-03-14 14:29:20 +00:00
|
|
|
let g:startify_custom_header = startify#fortune#get_random_quote()
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2016-03-14 14:29:20 +00:00
|
|
|
This is a list of strings to be shown before everything else. Every string
|
|
|
|
will be written on its own line, hence you can use empty strings for blank
|
|
|
|
lines.
|
2013-07-11 11:50:44 +00:00
|
|
|
|
2016-03-17 11:23:36 +00:00
|
|
|
Static example:~
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2016-03-14 14:29:20 +00:00
|
|
|
let g:startify_custom_header = ['line 1', '', 'line 3']
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2016-03-17 11:23:36 +00:00
|
|
|
Static example #2:~
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2013-07-11 11:50:44 +00:00
|
|
|
let g:startify_custom_header = [
|
2014-09-17 15:31:17 +00:00
|
|
|
\ ' ________ __ __ ',
|
|
|
|
\ ' __ /\_____ \/\ \\ \ ',
|
|
|
|
\ ' __ __ /\_\ ___ ___ \/___//''/''\ \ \\ \ ',
|
|
|
|
\ ' /\ \/\ \\/\ \ /'' __` __`\ /'' /'' \ \ \\ \_ ',
|
|
|
|
\ ' \ \ \_/ |\ \ \/\ \/\ \/\ \ /'' /''__ \ \__ ,__\',
|
|
|
|
\ ' \ \___/ \ \_\ \_\ \_\ \_\ /\_/ /\_\ \/_/\_\_/ ',
|
|
|
|
\ ' \/__/ \/_/\/_/\/_/\/_/ \// \/_/ \/_/ ',
|
|
|
|
\ ]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2016-03-17 11:23:36 +00:00
|
|
|
Dynamic example:~
|
2016-03-14 14:29:20 +00:00
|
|
|
>
|
|
|
|
let g:startify_custom_header =
|
|
|
|
\ map(split(system('fortune | cowsay'), '\n'), '" ". v:val')
|
|
|
|
<
|
2016-03-17 11:23:36 +00:00
|
|
|
If you go for a dynamic header, you might find the following functions useful:
|
|
|
|
|
2017-06-05 08:52:22 +00:00
|
|
|
startify#fortune#quote() raw random quote
|
|
|
|
startify#fortune#boxed(...) opt list or formatted random quote in a box
|
|
|
|
startify#fortune#cowsay() formatted random quote in a box + cow
|
2016-03-17 11:23:36 +00:00
|
|
|
|
|
|
|
Try them like this:
|
|
|
|
>
|
|
|
|
:echo join(startify#fortune#cowsay(), "\n")
|
|
|
|
<
|
|
|
|
Let's assume you like the default boxed random quote, but not the ASCII art
|
|
|
|
cow. You'd rather have another small ASCII art come before the quote. No
|
|
|
|
problem!
|
|
|
|
>
|
|
|
|
let g:ascii = [
|
|
|
|
\ ' __',
|
|
|
|
\ '.--.--.|__|.--------.',
|
|
|
|
\ '| | || || |',
|
|
|
|
\ ' \___/ |__||__|__|__|',
|
|
|
|
\ ''
|
|
|
|
\]
|
|
|
|
let g:startify_custom_header = g:ascii + startify#fortune#boxed()
|
|
|
|
<
|
|
|
|
Looks great! But it's not on the same column as the indices below which makes
|
|
|
|
it look awkward. Let's indent the header by 3 spaces:
|
|
|
|
>
|
|
|
|
let g:startify_custom_header =
|
|
|
|
\ map(g:ascii + startify#fortune#boxed(), '" ".v:val')
|
|
|
|
<
|
|
|
|
Ah, much better! There's only one issue left. If you set
|
|
|
|
g:startify_custom_header this way, it will only be done once. Hence spamming
|
|
|
|
:Startify will always show the same quote.
|
|
|
|
|
|
|
|
If you provide a string to it instead, Startify will evaluate it every time
|
|
|
|
:Startify is run:
|
|
|
|
>
|
|
|
|
let g:startify_custom_header =
|
|
|
|
\ 'map(g:ascii + startify#fortune#boxed(), "\" \".v:val")'
|
|
|
|
<
|
|
|
|
Happy customizing!
|
|
|
|
|
2015-02-11 13:58:10 +00:00
|
|
|
Also have a look at |startify-faq-08|.
|
2015-01-15 17:28:55 +00:00
|
|
|
|
2016-03-14 17:14:45 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_custom_header_quotes*
|
|
|
|
|
|
|
|
If you don't set |g:startify_custom_header|, the internal cowsay implementation
|
|
|
|
with shipped random quotes will be used.
|
|
|
|
|
2017-06-05 11:16:04 +00:00
|
|
|
To use your own quotes, set this option to a list of quotes. Each quote is
|
|
|
|
either another list or a |Funcref| (see |expr-lambda|) that returns a list.
|
|
|
|
|
|
|
|
Each element of the inner lists is put on an own line in the custom header.
|
2016-03-14 17:14:45 +00:00
|
|
|
>
|
|
|
|
let g:startify_custom_header_quotes = [
|
2017-06-05 11:16:04 +00:00
|
|
|
\ ['quote #1'],
|
|
|
|
\ ['quote #2', 'using', 'three lines'],
|
|
|
|
\ {-> systemlist('echo quote #3')}
|
2016-03-14 17:14:45 +00:00
|
|
|
\ ]
|
|
|
|
<
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_custom_footer*
|
|
|
|
>
|
2013-09-04 07:25:33 +00:00
|
|
|
let g:startify_custom_footer = ''
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-09-04 07:25:33 +00:00
|
|
|
Same as the custom header, but shown at the bottom of the startify buffer.
|
|
|
|
|
2013-10-10 15:47:42 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*g:startify_disable_at_vimenter*
|
|
|
|
>
|
2013-09-24 16:17:26 +00:00
|
|
|
let g:startify_disable_at_vimenter = 0
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-09-24 16:17:26 +00:00
|
|
|
Don't run Startify at Vim startup. You can still call it anytime via
|
|
|
|
:Startify.
|
|
|
|
|
2013-12-04 11:48:14 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
*g:startify_relative_path*
|
|
|
|
>
|
|
|
|
let g:startify_relative_path = 0
|
|
|
|
<
|
2017-05-29 10:58:55 +00:00
|
|
|
If the file is in or below the current working directory, use a relative path.
|
|
|
|
Otherwise an absolute path is used. The latter prevents hard to grasp entries
|
|
|
|
like `../../../../../foo`.
|
|
|
|
|
|
|
|
NOTE: This only applies to the "files" list, since the "dir" list is
|
2014-11-23 16:39:51 +00:00
|
|
|
relative by nature.
|
2013-12-04 11:48:14 +00:00
|
|
|
|
2016-02-12 13:21:05 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
*g:startify_use_env*
|
|
|
|
>
|
|
|
|
let g:startify_use_env = 0
|
|
|
|
<
|
|
|
|
Show environment variables in path, if their name is shorter than their value.
|
2016-02-12 13:49:01 +00:00
|
|
|
See |startify-colors| for highlighting them.
|
2016-02-12 13:21:05 +00:00
|
|
|
|
|
|
|
$PWD and $OLDPWD are ignored.
|
|
|
|
|
2014-09-11 15:50:01 +00:00
|
|
|
==============================================================================
|
|
|
|
AUTOCMD *startify-autocmd*
|
|
|
|
|
|
|
|
In case you want to alter the startify buffer to cause all kinds of mayhem, an
|
|
|
|
user autocmd is issued. You can hook into it like this:
|
|
|
|
>
|
|
|
|
autocmd User Startified let &l:stl = ' This statusline rocks!'
|
|
|
|
<
|
2016-07-21 15:09:15 +00:00
|
|
|
NOTE: Autocmds don't nest by default. If you use any command that triggers new
|
|
|
|
events, be sure to add "nested": |autocmd-nested|.
|
|
|
|
|
2013-04-24 05:53:33 +00:00
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
COMMANDS *startify-commands*
|
2016-03-17 12:00:41 +00:00
|
|
|
*startify-:Startify*
|
2016-03-07 12:23:46 +00:00
|
|
|
>
|
|
|
|
:Startify
|
|
|
|
<
|
|
|
|
Open the startify buffer.
|
2016-03-17 12:00:41 +00:00
|
|
|
*startify-:SSave*
|
|
|
|
*startify-:SDelete*
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2017-11-21 19:28:13 +00:00
|
|
|
:SSave[!] [session]
|
|
|
|
:SDelete[!] [session]
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2015-11-14 01:18:03 +00:00
|
|
|
Save or delete a session. If you don't specify a session name, it will prompt
|
|
|
|
you for one.
|
2017-11-21 19:28:13 +00:00
|
|
|
|
|
|
|
Use `:SSave!` or `:SDelete!` to always overwrite or delete an existing session.
|
|
|
|
|
2016-03-17 12:00:41 +00:00
|
|
|
*startify-:SLoad*
|
2015-11-14 01:18:03 +00:00
|
|
|
>
|
|
|
|
:SLoad [session]
|
|
|
|
<
|
|
|
|
Load a session. If you don't specify a session name, it will either prompt you
|
|
|
|
for one (Windows) or load the last used session (Unix).
|
2013-04-24 11:46:11 +00:00
|
|
|
|
2013-04-24 13:01:43 +00:00
|
|
|
Providing only a part of the session name works too, if you complete the
|
2013-04-25 07:01:20 +00:00
|
|
|
argument with either <c-d> or <tab> afterwards.
|
2017-01-11 15:55:45 +00:00
|
|
|
|
|
|
|
NOTE: This command is affected by |g:startify_session_delete_buffers|.
|
|
|
|
|
2016-03-17 12:00:41 +00:00
|
|
|
*startify-:SClose*
|
2015-01-05 23:59:17 +00:00
|
|
|
>
|
|
|
|
:SClose
|
|
|
|
<
|
|
|
|
Save and close the current session, close all listed buffers, and open the
|
|
|
|
Startify buffer.
|
2013-04-25 07:33:07 +00:00
|
|
|
|
2017-01-11 15:55:45 +00:00
|
|
|
NOTE: This command is affected by |g:startify_session_delete_buffers|.
|
|
|
|
|
2013-10-22 15:25:03 +00:00
|
|
|
==============================================================================
|
|
|
|
MAPPINGS *startify-mappings*
|
|
|
|
|
|
|
|
Some things are remapped in the startify buffer..
|
|
|
|
>
|
|
|
|
q
|
|
|
|
<
|
|
|
|
Close startify. Also quit Vim if it is the only buffer.
|
|
|
|
>
|
|
|
|
e
|
|
|
|
<
|
|
|
|
Close startify and create a blank buffer.
|
|
|
|
>
|
|
|
|
i
|
|
|
|
<insert>
|
|
|
|
<
|
|
|
|
Close startify, create a blank buffer and jump into insert mode right away.
|
|
|
|
>
|
|
|
|
<2-LeftMouse>
|
|
|
|
<
|
|
|
|
Use a simple mouse click to open the targeted entry.
|
|
|
|
>
|
|
|
|
[any number that is shown between square brackets]
|
|
|
|
<
|
|
|
|
Open the entry with the given number.
|
|
|
|
>
|
|
|
|
b
|
|
|
|
s
|
|
|
|
v
|
|
|
|
t
|
|
|
|
<
|
|
|
|
Mark current entry to be opened in either the same window, in a split window,
|
|
|
|
in a vertical split window or in a new tab.
|
|
|
|
>
|
|
|
|
<cr>
|
|
|
|
<
|
|
|
|
Open all marked entries. If nothing was marked beforehand, just open the
|
|
|
|
current entry.
|
|
|
|
|
2014-11-22 17:15:29 +00:00
|
|
|
If you want to use another key instead of <cr>, put this in your vimrc:
|
|
|
|
>
|
2014-11-22 17:47:18 +00:00
|
|
|
autocmd User Startified nmap <buffer> o <plug>(startify-open-buffers)
|
2014-11-22 17:15:29 +00:00
|
|
|
<
|
2013-04-24 05:53:33 +00:00
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
COLORS *startify-colors*
|
2013-04-29 10:36:48 +00:00
|
|
|
|
2013-05-07 20:15:25 +00:00
|
|
|
You can overwrite the highlight groups used by startify. The plugin defines
|
2013-04-29 10:36:48 +00:00
|
|
|
these groups:
|
|
|
|
|
2014-09-02 14:28:10 +00:00
|
|
|
Highlight group | Description | Default
|
|
|
|
------------------------------------------------------------------
|
|
|
|
| |
|
|
|
|
StartifyBracket | [,] | linked to Delimiter
|
|
|
|
StartifyFile | the actual file | <none>
|
|
|
|
StartifyFooter | the custom footer | linked to Normal
|
|
|
|
StartifyHeader | the custom header | linked to Normal
|
|
|
|
StartifyNumber | the numbers between [] | linked to Number
|
|
|
|
StartifyPath | the path to a file | <none>
|
|
|
|
StartifySection | section headers | linked to Special
|
|
|
|
StartifySelect | selected entries | linked to Title
|
|
|
|
StartifySlash | slashes in paths | <none>
|
|
|
|
StartifySpecial | <empty buffer>,<quit> | <none>
|
2016-02-12 13:49:01 +00:00
|
|
|
StartifyVar | environment variables | linked to StartifyPath
|
2013-04-29 10:36:48 +00:00
|
|
|
|
|
|
|
Example: (my terminal emulator supports 256 colors)
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2014-09-02 14:28:10 +00:00
|
|
|
highlight StartifyBracket ctermfg=240
|
|
|
|
highlight StartifyFooter ctermfg=240
|
|
|
|
highlight StartifyHeader ctermfg=114
|
|
|
|
highlight StartifyNumber ctermfg=215
|
|
|
|
highlight StartifyPath ctermfg=245
|
|
|
|
highlight StartifySlash ctermfg=240
|
|
|
|
highlight StartifySpecial ctermfg=240
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-04-29 10:36:48 +00:00
|
|
|
==============================================================================
|
2013-10-10 15:47:42 +00:00
|
|
|
FAQ *startify-faq*
|
2013-04-25 07:10:23 +00:00
|
|
|
|
2014-09-11 16:59:31 +00:00
|
|
|
|startify-faq-01| I don't want the start screen to use cursorline!
|
|
|
|
|startify-faq-02| Recent files aren't shown!
|
2015-02-11 13:58:10 +00:00
|
|
|
|startify-faq-03| I have broken colors when using sessions!
|
|
|
|
|startify-faq-04| How to disable common but unimportant files?
|
2017-01-19 00:34:43 +00:00
|
|
|
|startify-faq-05| Why is the Startify buffer not using buftype=nofile?
|
2015-02-11 13:58:10 +00:00
|
|
|
|startify-faq-06| How do I get both NERDTree and Startify working at
|
2014-09-11 16:59:31 +00:00
|
|
|
startup?
|
2015-02-11 13:58:10 +00:00
|
|
|
|startify-faq-07| The session autoload feature is not working!
|
|
|
|
|startify-faq-08| How do I center my header/footer?
|
2015-11-14 02:09:47 +00:00
|
|
|
|startify-faq-09| tmux-resurrect?
|
2015-12-07 13:59:16 +00:00
|
|
|
|startify-faq-10| Temporarily skip Startify at start?
|
2016-01-05 22:00:10 +00:00
|
|
|
|startify-faq-11| How to use the output of a command as header?
|
2016-03-04 09:49:11 +00:00
|
|
|
|startify-faq-12| There is an empty window with vim-plug!
|
2016-03-14 14:33:22 +00:00
|
|
|
|startify-faq-13| How to disable random quotes header?
|
2014-09-11 16:59:31 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-01*
|
2014-10-30 16:12:00 +00:00
|
|
|
I want to use cursorline!~
|
2013-08-13 09:47:29 +00:00
|
|
|
|
2014-10-30 16:12:00 +00:00
|
|
|
Startify issues a User event when it's finished. It can be used to set
|
|
|
|
buffer-local options etc.
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2014-10-30 16:12:00 +00:00
|
|
|
autocmd User Startified setlocal cursorline
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-08-21 07:26:41 +00:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 16:59:31 +00:00
|
|
|
*startify-faq-02*
|
2014-08-20 16:53:13 +00:00
|
|
|
Recent files aren't shown!~
|
2013-08-05 13:04:01 +00:00
|
|
|
|
2014-08-20 16:53:13 +00:00
|
|
|
Perhaps the problem is that the viminfo file..
|
2013-08-10 08:43:28 +00:00
|
|
|
|
2014-08-20 16:53:13 +00:00
|
|
|
- doesn't exist
|
|
|
|
- is invalid
|
|
|
|
- is empty
|
|
|
|
- can't be read (check permissions)
|
2013-08-10 08:43:28 +00:00
|
|
|
|
2014-08-20 16:53:13 +00:00
|
|
|
I suggest the following steps:
|
|
|
|
|
|
|
|
1) Create a new directory:
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2014-08-20 16:53:13 +00:00
|
|
|
$ mkdir -p ~/.vim/files/info
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2014-08-20 16:53:13 +00:00
|
|
|
2) Put this into your vimrc:
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2014-08-20 16:53:13 +00:00
|
|
|
set viminfo='100,n$HOME/.vim/files/info/viminfo
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2014-08-20 16:53:13 +00:00
|
|
|
See |'viminfo'| for information about the second step and what it does
|
|
|
|
exactly.
|
|
|
|
|
2013-08-21 07:26:41 +00:00
|
|
|
------------------------------------------------------------------------------
|
2014-09-11 16:59:31 +00:00
|
|
|
*startify-faq-03*
|
2013-10-18 09:51:55 +00:00
|
|
|
I have broken colors when using sessions!~
|
2013-04-25 14:36:17 +00:00
|
|
|
|
2013-04-26 09:45:51 +00:00
|
|
|
Nothing this plugin could do about. Try playing around with 'sessionoptions'.
|
2013-10-18 09:51:55 +00:00
|
|
|
|
|
|
|
NOTE: Startify removes 'options' from the session options automatically,
|
|
|
|
because it's the source of many problems.
|
|
|
|
|
2013-04-25 14:36:17 +00:00
|
|
|
Some people swear it works for them with these settings:
|
2013-10-10 15:47:42 +00:00
|
|
|
>
|
2013-04-25 14:36:17 +00:00
|
|
|
set sessionoptions=blank,curdir,folds,help,tabpages,winpos
|
2013-10-10 15:47:42 +00:00
|
|
|
<
|
2013-08-21 07:26:41 +00:00
|
|
|
------------------------------------------------------------------------------
|
2015-02-11 13:58:10 +00:00
|
|
|
*startify-faq-04*
|
2013-10-10 15:47:42 +00:00
|
|
|
How to disable common but unimportant files?~
|
2013-08-21 07:26:41 +00:00
|
|
|
|
2015-07-06 16:19:43 +00:00
|
|
|
Use |g:startify_skiplist|.
|
|
|
|
|
2014-08-20 16:53:13 +00:00
|
|
|
------------------------------------------------------------------------------
|
2015-02-11 13:58:10 +00:00
|
|
|
*startify-faq-05*
|
2017-01-19 00:34:43 +00:00
|
|
|
Why is the Startify buffer not using buftype=nofile?~
|
2014-08-20 16:53:13 +00:00
|
|
|
|
2017-01-19 00:34:43 +00:00
|
|
|
Did you accidentally use |:write| in the Startify buffer and it was saved to
|
|
|
|
an actual file on disk? It's because buftype=nofile is not used.
|
|
|
|
|
|
|
|
This is done to improve compatibility with other plugins. When buftype=nofile
|
|
|
|
was set, plugins like CtrlP or NERDTree would open splits instead of reusing
|
|
|
|
the window showing the Startify buffer.
|
|
|
|
|
|
|
|
If you understand this but want it anyway, put this in your vimrc:
|
2014-08-20 16:53:13 +00:00
|
|
|
>
|
2017-01-19 00:34:43 +00:00
|
|
|
autocmd User Startified setlocal buftype=nofile
|
2014-08-20 16:53:13 +00:00
|
|
|
<
|
|
|
|
------------------------------------------------------------------------------
|
2015-02-11 13:58:10 +00:00
|
|
|
*startify-faq-06*
|
2014-08-20 16:53:13 +00:00
|
|
|
How do I get both NERDTree and Startify working at startup?~
|
|
|
|
|
|
|
|
Put this in your vimrc:
|
|
|
|
>
|
|
|
|
autocmd VimEnter *
|
2014-09-30 10:44:39 +00:00
|
|
|
\ if !argc()
|
|
|
|
\ | Startify
|
|
|
|
\ | NERDTree
|
|
|
|
\ | wincmd w
|
|
|
|
\ | endif
|
2014-08-20 16:53:13 +00:00
|
|
|
<
|
|
|
|
------------------------------------------------------------------------------
|
2015-02-11 13:58:10 +00:00
|
|
|
*startify-faq-07*
|
2014-08-20 16:53:13 +00:00
|
|
|
The session autoload feature is not working!~
|
|
|
|
|
|
|
|
Do you have NERDTree installed by any chance? If so, try this:
|
|
|
|
>
|
|
|
|
let NERDTreeHijackNetrw = 0
|
|
|
|
<
|
2015-01-15 17:28:55 +00:00
|
|
|
------------------------------------------------------------------------------
|
2015-02-11 13:58:10 +00:00
|
|
|
*startify-faq-08*
|
2015-01-15 17:28:55 +00:00
|
|
|
How do I center my header/footer?~
|
|
|
|
|
|
|
|
Try something along these lines:
|
|
|
|
>
|
|
|
|
function! s:filter_header(lines) abort
|
2017-01-11 11:57:33 +00:00
|
|
|
let longest_line = max(map(copy(a:lines), 'strwidth(v:val)'))
|
2015-01-15 17:28:55 +00:00
|
|
|
let centered_lines = map(copy(a:lines),
|
|
|
|
\ 'repeat(" ", (&columns / 2) - (longest_line / 2)) . v:val')
|
|
|
|
return centered_lines
|
|
|
|
endfunction
|
2016-11-24 19:32:24 +00:00
|
|
|
let g:startify_custom_header = s:filter_header(startify#fortune#cowsay())
|
2015-01-15 17:28:55 +00:00
|
|
|
<
|
2015-11-14 02:09:47 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-09*
|
|
|
|
tmux-resurrect?~
|
|
|
|
|
|
|
|
If you use tmux-resurrect to restore your tmux environment, you can use :SLoad
|
|
|
|
to load your last used session right away:
|
|
|
|
>
|
|
|
|
set -g @resurrect-processes '"vim->vim +SLoad"'
|
|
|
|
<
|
2015-12-07 13:59:16 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-10*
|
|
|
|
Temporarily skip Startify at start?~
|
|
|
|
|
|
|
|
In some cases you might need to skip Startify at start. E.g.
|
|
|
|
>
|
|
|
|
vim +VimwikiMakeDiaryNote
|
|
|
|
<
|
|
|
|
Startify would interfere in this case. A simple way to avoid that would be:
|
|
|
|
>
|
|
|
|
vim --cmd 'let g:startify_disable_at_vimenter = 1' +VimwikiMakeDiaryNote
|
|
|
|
<
|
2016-01-05 22:00:10 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-11*
|
|
|
|
How to use the output of a command as header?~
|
|
|
|
>
|
|
|
|
redir => test
|
|
|
|
silent echo 'one'
|
|
|
|
silent echo 'two'
|
|
|
|
silent echo 'three'
|
|
|
|
redir END
|
|
|
|
|
|
|
|
let g:startify_custom_header =
|
2016-03-14 14:29:20 +00:00
|
|
|
\ map(split(test), 'repeat(" ", 10) . v:val')
|
2016-01-05 22:00:10 +00:00
|
|
|
<
|
|
|
|
|:redir| puts a string into 'test'. Then we turn it into a list of strings.
|
|
|
|
Then we shift each string to the right by 10 spaces. Afterwards we add an
|
|
|
|
empty string to the list, which results in an empty line in the header.
|
|
|
|
|
2016-03-04 09:49:11 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-12*
|
|
|
|
There is an empty window with vim-plug!~
|
|
|
|
|
|
|
|
After start there might be only the Startify buffer which is marked as
|
|
|
|
|unlisted-buffer|. The problem arises if you use :PlugUpdate followed by 'D'
|
|
|
|
to see the changes. An empty window!
|
|
|
|
|
|
|
|
The actual problem is that Vim won't close the last listed buffer. Try this:
|
|
|
|
>
|
|
|
|
$ vim -u NONE -N
|
|
|
|
:set nobuflisted
|
|
|
|
:new
|
|
|
|
:bd
|
|
|
|
<
|
|
|
|
It won't close the buffer and therefore the window. This also happens in
|
|
|
|
vim-plug. Note that this is no bug in neither plugin, it's a Vim weirdness.
|
|
|
|
|
|
|
|
Workaround #1:~
|
|
|
|
>
|
|
|
|
autocmd User Startified setlocal buflisted
|
|
|
|
<
|
|
|
|
In some cases this could break other plugins at start (I look at you
|
|
|
|
NERDTree), but works well most of the time.
|
|
|
|
|
|
|
|
Workaround #2:~
|
|
|
|
>
|
|
|
|
let g:plug_window = 'enew' " or maybe 'tabnew'
|
|
|
|
<
|
|
|
|
This will open the plug buffer in the current window instead of creating a new
|
|
|
|
window on the left side. Mind that this will also close the Startify buffer
|
|
|
|
since it will be hidden.
|
|
|
|
|
2016-03-14 14:33:22 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*startify-faq-13*
|
|
|
|
How to disable random quotes header?~
|
|
|
|
>
|
|
|
|
let g:startify_custom_header = []
|
|
|
|
<
|
|
|
|
See |g:startify_custom_header|.
|
|
|
|
|
2013-04-24 05:53:33 +00:00
|
|
|
==============================================================================
|
2013-10-22 19:32:08 +00:00
|
|
|
EXAMPLE *startify-example*
|
|
|
|
|
|
|
|
This is my configuration..
|
|
|
|
>
|
2014-10-23 10:37:04 +00:00
|
|
|
autocmd User Startified setlocal cursorline
|
2014-09-09 11:57:15 +00:00
|
|
|
|
|
|
|
let g:startify_enable_special = 0
|
|
|
|
let g:startify_files_number = 8
|
|
|
|
let g:startify_relative_path = 1
|
|
|
|
let g:startify_change_to_dir = 1
|
2016-03-07 12:21:16 +00:00
|
|
|
let g:startify_update_oldfiles = 1
|
2014-09-09 11:57:15 +00:00
|
|
|
let g:startify_session_autoload = 1
|
|
|
|
let g:startify_session_persistence = 1
|
2013-10-22 19:32:08 +00:00
|
|
|
|
|
|
|
let g:startify_skiplist = [
|
2017-01-12 00:40:45 +00:00
|
|
|
\ 'COMMIT_EDITMSG',
|
|
|
|
\ 'bundle/.*/doc',
|
|
|
|
\ '/data/repo/neovim/runtime/doc',
|
|
|
|
\ '/Users/mhi/local/vim/share/vim/vim74/doc',
|
|
|
|
\ ]
|
2013-10-22 19:32:08 +00:00
|
|
|
|
|
|
|
let g:startify_bookmarks = [
|
2017-01-12 00:40:45 +00:00
|
|
|
\ { 'c': '~/.vim/vimrc' },
|
|
|
|
\ '~/golfing',
|
|
|
|
\ ]
|
|
|
|
|
|
|
|
let g:startify_custom_header =
|
|
|
|
\ startify#fortune#cowsay('═','║','╔','╗','╝','╚')
|
2013-10-22 19:32:08 +00:00
|
|
|
|
|
|
|
let g:startify_custom_footer =
|
2017-01-12 00:40:45 +00:00
|
|
|
\ ['', " Vim is charityware. Please read ':help uganda'.", '']
|
2013-10-22 19:32:08 +00:00
|
|
|
|
|
|
|
hi StartifyBracket ctermfg=240
|
2014-09-09 11:57:15 +00:00
|
|
|
hi StartifyFile ctermfg=147
|
|
|
|
hi StartifyFooter ctermfg=240
|
|
|
|
hi StartifyHeader ctermfg=114
|
2013-10-22 19:32:08 +00:00
|
|
|
hi StartifyNumber ctermfg=215
|
|
|
|
hi StartifyPath ctermfg=245
|
|
|
|
hi StartifySlash ctermfg=240
|
|
|
|
hi StartifySpecial ctermfg=240
|
|
|
|
<
|
|
|
|
==============================================================================
|
2013-04-24 05:53:33 +00:00
|
|
|
vim: tw=78
|