Commit graph

197 commits

Author SHA1 Message Date
Marco Hinz 8fd4247218 Refactoring: handle all file opening in #open_buffers() 2015-05-28 17:16:09 +02:00
Marco Hinz d2af054a59 Escape '[' on Windows
Escape '[' as according to ":h wildcard", so it doesn't get interpreted as a
pattern, like "[0-9]".

References #161.
2015-05-28 13:12:04 +02:00
Marco Hinz acbce306b2 Use same open mechanism for all supported methods 2015-05-28 12:49:24 +02:00
Marco Hinz 51f64a28e8 Use feedkeys() properly #2
With mode 't' enabled, you'd get a timeout if you had indices 1 and 11 and
keyed in '1'.
2015-05-28 11:55:52 +02:00
Marco Hinz 7375e31f79 Use feedkeys() properly 2015-05-28 11:20:49 +02:00
Marco Hinz 167af9490a Don't skip encryption key prompt
References #162.
2015-05-28 11:13:18 +02:00
Marco Hinz d7adb1709f Proper filename escaping
A glob() is effectively undoing a fnameescape().

References #160.
2015-05-18 20:59:18 +02:00
Marco Hinz 1f42935fd6 Introduce g:startify_session_remove_lines
References #159.
2015-05-12 12:02:19 +02:00
Marco Hinz 9ef7fcb502 Small maintenance tasks 2015-04-28 15:34:11 +02:00
Marco Hinz eccf570aea Don't allow gj type mappings
Assuming a small screen and 'wrap' set:

The cursor is forced to stay in a certain column, so doing gj on a wrapped
line will jump into an area outside the position [x] and jump back into it
immediately effectively breaking navigation.

Solution: use local mappings that just do the usual h/j/k/l dance.

References #156.
2015-04-22 11:22:40 +02:00
Marco Hinz 3e143739d7 Expand '~' in the skiplist
The skiplist gets checked against normal Vim regular expressions. That also
means that you can't just use '~'; see ":h /\~".

That especially sneaky if you use variables that refer to directories within
your home directory.

Solution: expand them via fnamemodify().

References #154.
2015-04-20 02:46:36 +02:00
Pedro Nicolás Gómez 96ccdf7f15 Fix :SSave problem with wildmode
With these settings: wildmode=list and laststatus=2

When call the command :SSave and use <tab> for autocomplete, and choose any
session, then the message "Session already exists. Overwrite?  [y/n]" does not
appear on screen.

References #155.
2015-04-16 12:24:56 +02:00
Marco Hinz 36ff6db44a Fix :enew handling (again)
fugitive is run at VimEnter and for new buffers that are associated with
files.

Now fugitive commands will be available after start (in the Startify screen),
but it won't work after calling :Startify, since fugitive is designed that
way.

References #33.
2015-03-25 16:05:26 +01:00
Marco Hinz 08c0164a1b Introduce g:startify_enable_unsafe
References #149.
2015-03-06 16:12:17 +01:00
Marco Hinz 66083493ed Verbatim matching of path prefix
Closes #146.
2015-02-02 01:38:36 +01:00
Marco Hinz 362fa1d957 Fix autoloading of sessions from bookmarked directories
References #144.
2015-01-14 11:46:18 +01:00
Marco Hinz aea086205c Change meaning of g:startify_session_autoload
References #142.
2015-01-08 21:42:54 +01:00
coachshea b89114f359 Add :SClose
References #141.
2015-01-06 00:47:39 +01:00
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