Commit graph

229 commits

Author SHA1 Message Date
Marco Hinz a8657753d6 Avoid unset w:startify_section_header_lines
Change w:startify_section_header_lines to b: to avoid it being unset on :split
and similar commands.

References #137.
2014-12-17 13:01:27 +01:00
Marco Hinz 22f1d58333 Fix last line #2
References #132.
2014-11-26 16:04:28 +01:00
Marco Hinz 8c3ff7f727 Remove unneeded copy() 2014-11-25 12:30:53 +01:00
Marco Hinz d3e2ebd3e3 Correct grammar: "last recently" -> "most recently"
Closes #129.
2014-11-25 12:19:59 +01:00
Marco Hinz 1becbe7724 Fix missing argument
References #130.
2014-11-24 21:46:26 +01:00
Daniel Hahler 5655c69459 s:close(): only use "b#" if it's different from "%"
Closes #127.
2014-11-24 11:24:00 +01:00
Marco Hinz 337e1a8c24 Refactoring: fix last line usage 2014-11-23 17:52:25 +01:00
Marco Hinz 8e9ef61087 Refactoring: make "dir" list always relative 2014-11-23 17:39:51 +01:00
Marco Hinz 3151fdf4b1 Refactoring: l:cnt -> s:entry_number 2014-11-23 17:17:22 +01:00
Daniel Hahler 1b6b53f2f9 Refactoring: show_dir and show_files
This de-duplicates the shared code, and adds some (first) improvements
to not stat all of v:oldfiles (twice).

If accepted, it allows for easily adding a cache for abs_path handling
etc.

 - Add _show_filtered_oldfiles and _get_filtered_oldfiles
 - Fixes g:startify_files_number<1
2014-11-23 10:26:13 +01:00
Marco Hinz 339cdae1af Expose "open buffers" functionality for mapping
References #123.
2014-11-22 18:15:29 +01:00
Daniel Hahler 697d008f1b Make all mappings silent
Closes #123.
2014-11-22 18:03:19 +01:00
Marco Hinz 82496e92aa Use input{save,restore}() 2014-11-20 14:21:01 +01:00
Daniel Hahler 07e10a15a0 Set StartifySection via syntax file
This keeps it highlighted after 'set ft=startify' etc.

References #117.
2014-11-16 15:09:00 +01:00
Marco Hinz e964a581d0 Only set customized &stl if it's empty
References #118.
2014-11-16 14:06:25 +01:00
Marco Hinz d17bc302d4 Fix switching to calling buffer
References #115.
2014-11-13 21:01:45 +01:00
Marco Hinz 7d36933f9c Don't truncate g:startify_session_savevars
References #113.
2014-10-23 12:13:05 +02:00
Marco Hinz 6a933d2c24 Don't start at 'vim -y'
References #111.
2014-09-29 11:38:04 +02:00
Marco Hinz af2368cd75 Sessions: only prune unlisted buffers from arglist
References #110.
2014-09-21 14:08:40 +02:00
Marco Hinz 5334a7eed5 Remove g:startify_session_detection
This was always enabled by default and no one seems to disable it.
2014-09-17 17:22:28 +02:00
Marco Hinz 298b53aeca Remove g:startify_restore_position
This is an unnecessary option.

    :h last-position-jump
2014-09-17 16:42:37 +02:00
Marco Hinz fa866e16f1 Remove g:startify_empty_buffer_key
This is an unnecessary option. It can be done like this:

    autocmd User Startified nnoremap <buffer><silent>X :enew<cr>
2014-09-17 16:32:07 +02:00
Reuben D'Netto 88a3c7e420 Read g:startify_list_order every time
Closes #109.
2014-09-17 16:30:00 +02:00
Marco Hinz 1a5586e0da Trigger User autocmd for people to hook into
References #107.
2014-09-11 17:50:01 +02:00
Marco Hinz 00e9af20b3 Use sane defaults instead of an empty skiplist 2014-09-09 13:46:44 +02:00
Marco Hinz fc9a305bd9 Merge branch 'pers-sessions' 2014-09-08 11:18:42 +02:00
Marco Hinz 67e9147b51 Reset list of section lines properly 2014-09-07 19:12:18 +02:00
Marco Hinz 4a788df9b4 Don't save the startify buffer in a session
References #106.
2014-09-07 18:49:49 +02:00
Marco Hinz d4eb81e5f2 Saner cursor starting position 2014-09-05 21:46:43 +02:00
Marco Hinz 1765f6b6bb Prune arglist before saving sessions
:mksession saves opened buffers and files listed in the arglist.

Assuming you would do:

    $ vim foo bar
    :SS session
    :x
    $ vim
    :SL session
    :bwipeout bar
    :x

In that case the only file left in the session should be 'foo'. But
that's not the case, since :mksession! also saves the argument list,
which still consists of 'foo' and 'bar'. Next time you load the session,
both buffers would be opened again.

But since the argument list is seldomly used, or at least not with the
arguments that were given to Vim, it will be pruned from now on.

References #106.
2014-09-05 19:38:01 +02:00
Marco Hinz 4558912d0c Save sessions before loading another one
References #106.
2014-09-05 19:15:34 +02:00
Marco Hinz 1b7ca2ed7c Fix regex for properly selecting several entries 2014-09-02 23:12:52 +02:00
Marco Hinz eca7c84c41 Don't ignore file extensions of sessions 2014-09-02 22:46:48 +02:00
Marco Hinz 4b9e87cdda Fix Number/Select highlighting for corner cases 2014-09-02 17:56:15 +02:00
Marco Hinz 9102978c7b Fix filenames with spaces - again #2
Vim automagically does some globbing, if a path to :edit contains
special characters.

Works:        :edit /tmp/foo [bar]
Doesn't work: :edit /tmp/foo bar

This reverts 03de6ee but fixes the actual problem in another place by
throwing escape(xxx, ' ') at the path.

References #102.
2014-09-02 17:08:49 +02:00
Marco Hinz 03de6ee94d Fix filenames with spaces - again
References #102.
2014-09-02 15:06:56 +02:00
Marco Hinz 2fe12144eb Respect g:startify_session_delete_buffers in all cases
Closes #104.
2014-09-01 19:09:52 +02:00
Marco Hinz 90358248e3 Escape paths before globbing
References #82.
2014-08-21 18:56:41 +02:00
Marco Hinz aa17d6a7cb Refactor show_{dir,files}() 2014-08-21 15:08:15 +02:00
Marco Hinz b37d42509b Fix change_to_dir option
Thanks for reporting, @Osse.
2014-08-21 10:31:04 +02:00
Marco Hinz ec869a589e Issue a warning if the viminfo file can't be read
Also add a typical solution to the FAQ.

Closes #89.
2014-08-20 19:00:58 +02:00
Weirong Xu cbc2b29575 Map: use silent nnoremap to open entries 2014-07-14 18:53:12 +02:00
Marco Hinz 3f8699c4ee Fix index order in certain corner case
Closes #93.
2014-06-11 12:24:51 +02:00
Marco Hinz 19da8f9ee8 Make persistence work with normal sessions 2014-06-11 12:14:21 +02:00
ZeroKnight 678df1e12c Fix pathname display on Windows
glob(fname) forces `fname` to abide by the 'shellslash' setting

fnamemodify(..., ':p:~') will shorten pathnames to '~/...' if possible
2014-04-24 08:32:59 +02:00
ZeroKnight 2872ab750b Fix "last modified" entries not showing with nossl
On Windows with 'noshellslash', the 'dir' section would never show up due to the
unescaped backslashes in `cwd`.

escape() backslashes (if they exist) so that match() will pass properly.
2014-04-24 08:32:59 +02:00
ZeroKnight c92b283b56 setlocal nocursorcolumn
For those who enjoy crosshairs :)
2014-04-24 01:08:06 -04:00
Alex George 8954e92fa7 Fix skiplist matching on Windows
See issue #52

In order to enable platform-agnostic patterns in `g:startify_skiplist`, as long as `shellslash` is set in a user's `.vimrc` before loading the plugin, patterns in `g:startify_skiplist` will work even if they use forward slashes.
2014-04-20 12:19:53 -04:00
Marco Hinz 95e8b9f95f Fix scope mistake
Closes #76.
2014-03-31 21:34:28 +02:00
Marco Hinz ac67377d52 Small refactoring 2014-03-31 18:40:37 +02:00
Marco Hinz 19870ae159 Proper use of User autocmd 2014-03-31 18:09:40 +02:00
Øystein Walle 5370a743f2 New option: show relative paths
Closes #72.
2014-03-31 10:30:52 +02:00
Marco Hinz 110af7a38a Prevent using filter() on invalid types of values
Closes #75.
2014-03-31 10:18:58 +02:00
Marco Hinz 0bc4aae6f4 Make dir listing recursive
Closes #63.
2014-03-21 00:28:25 +01:00
UncleBill 85a7168d71 Delete open buffers before loading a new session
Closes #70.
2014-03-18 11:34:53 +01:00
Daniel Hahler 69fa3cf9af Handle "swap file found" (E325) exception
The user has been warned and asked about how to proceed already.
Catching this exception removes the additional output afterwards:

  Error detected while processing function <SNR>237_open_buffers:
  line   38:
  E325: ATTENTION

Closes #67.
2014-02-15 21:51:59 +01:00
Marco Hinz 2c4113999d Also fnameescape() if opening multiple files 2014-01-30 18:30:15 +01:00
Marco Hinz ca6915e420 Handle encrypted files 2013-12-19 10:26:00 +01:00
Marco Hinz 515bcd48b4 Make section highlighting local to buffer 2013-12-02 21:45:34 +01:00
Marco Hinz cbdfa0cd9d Heavy cursor handling refactoring
This elegant approach of cursor handling was sponsored by @Osse.

Thanks!
2013-10-24 07:33:19 +02:00
Marco Hinz 6121a5ebaa Fix wrong cursor position in a certain case pt2 2013-10-24 06:53:15 +02:00
Marco Hinz a5cb421dae Improve on when to clear matches 2013-10-23 21:19:35 +02:00
Marco Hinz 48b7307e9e Fix wrong cursor position in a certain case 2013-10-23 16:47:43 +02:00
Marco Hinz fc1999dcf7 Clear matches on opening entries 2013-10-22 20:17:57 +02:00
Marco Hinz 2bf1b5a1e0 Remove old and useless line 2013-10-22 19:16:59 +02:00
Marco Hinz 1d5d2458d2 Fix cursor handling with section headers 2013-10-22 14:42:31 +02:00
Marco Hinz ebe31cc63d Merge branch 'section-headers'
References #45.
2013-10-22 13:38:18 +02:00
Marco Hinz 0968e6669e Make section headers easier to customize 2013-10-22 13:36:29 +02:00
Marco Hinz fd174b8f2f Make cursor handling work with sections 2013-10-22 13:22:36 +02:00
Marco Hinz b7fe86e492 Add highlighting for section headers 2013-10-22 13:01:32 +02:00
Marco Hinz 55d7bec03a Revert "Bang normal commands"
I forgot that I used no bang on purpose here. I'm very sorry for the
inconvenience.

This reverts commit b63c09907d.

Closes #55.
2013-10-20 16:26:31 +02:00
Marco Hinz 0ed0cd7e73 Use full keywords 2013-10-18 19:50:23 +02:00
Marco Hinz c657a56659 Use the blackhole register for :delete 2013-10-18 19:41:42 +02:00
Marco Hinz b63c09907d Bang normal commands 2013-10-18 19:37:19 +02:00
Marco Hinz eacd402a52 Sessions: don't save options
sessionoptions=options is a source of many problems. Startify disables
it temporarily.

References #49.
2013-10-18 11:48:03 +02:00
Marco Hinz 48ed94400f Add context-sensitive section headers 2013-10-10 13:05:50 +02:00
Marco Hinz 446f7dbbff Move modelines from bottom to top 2013-09-24 17:41:31 +02:00
Marco Hinz 03810e9096 New options: g:startify_session_save{vars,cmds} 2013-09-24 17:38:52 +02:00
Asa Jay f8c60d9fd3 Force setting of filetype
In combination with certain plugins, the filetype wouldn't be set for
Startify, because a filetype was already set by another plugin in the
series of VimEnter autocmds.

Setting the filetype gets forced now.
2013-09-23 11:02:25 +02:00
Marco Hinz 33edf8d9dd Fix cursor handling #2 2013-09-20 15:28:21 +02:00
Marco Hinz 80c379980b Readd s:lastline 2013-09-20 14:23:20 +02:00
Marco Hinz 7a4b8bc340 Make cursor not wrap around
The wrap around feature was nice, but added too much code for what it
was worth. It also kind of defeated navigation by motions like }, gg
etc.
2013-09-20 11:07:34 +02:00
Marco Hinz eb6e522245 Fix cursor handling
The cursor wouldn't wrap around to the top entry when you hit 'j' on the
last one.
2013-09-20 02:35:19 +02:00
Matthew Boehm 11241aff4e Remove :1
This was used as a workaround for people setting 'lines' to a too high
value when using gvim.

References #31.
2013-09-20 01:43:56 +02:00
Marco Hinz 3fb8465c0f Silent "1 line less" message 2013-09-18 11:43:05 +02:00
Marco Hinz b47853f09d Avoid error when no footer is set
Closes #46.
2013-09-06 21:57:01 +02:00
Marco Hinz 9e6b819936 Bump version to 1.8 2013-09-04 09:38:53 +02:00
Marco Hinz 85ce548261 Add highlighting for custom footer 2013-09-04 09:25:33 +02:00
Marco Hinz 3b362f6514 Remove debug echo 2013-09-03 18:50:54 +02:00
Marco Hinz 6fd47ecea4 New option: g:startify_custom_footer 2013-09-03 00:08:17 +02:00
Marco Hinz 4f7d5aae53 Fix last line issue 2013-09-01 20:03:55 +02:00
Marco Hinz ddb4fce6b9 Make <insert> work like i 2013-08-31 21:41:32 +02:00
Marco Hinz d6932388c6 Merge pull request 42 from bling 2013-08-31 21:29:34 +02:00
Bailey Ling a64ee097d8 New option: g:startify_change_to_vcs_root 2013-08-31 21:28:11 +02:00
Marco Hinz a3021bd42b Fix comment typos 2013-08-22 19:54:46 +02:00
Marco Hinz 5a14004635 Refactor s:open_buffers() 2013-08-22 19:39:27 +02:00
Marco Hinz 26638b30d4 Introduce T for opening files in tabs
Closes #39.
2013-08-22 19:14:34 +02:00
Marco Hinz 68bbece773 Prevent marking sessions 2013-08-15 13:44:19 +02:00
Marco Hinz 0354319801 SSave: fix warning message 2013-08-13 14:19:51 +02:00
Marco Hinz b624d3a439 New option: g:startify_session_persistence
Whenever you load/save a session, v:this_session is set automatically.
If this option is enabled and v:this_session exists, the session file
will be updated before exiting Vim.

References #32.
2013-08-13 11:10:41 +02:00