Commit Graph

96 Commits

Author SHA1 Message Date
Rane Brown
1a4e1ed1ae Stylistic changes to pass vint tests.
Two non-stylistic errors were also fixed:
  1. Removed duplicate function with invalid argument usage
  2. Added missing quotes to a function call argument
2019-12-20 20:41:03 -07:00
Rane Brown
f6a99569bd Merge abhinav-dev
autocmd registration simplification
2019-08-28 03:50:30 -06:00
Rane Brown
4458216760 <leader>ww opens the currently active wiki.
The previous behavior was to open the index of the first wiki. This
change makes the command more consistent with similar mappings.
Closes #741.
2019-08-25 14:25:31 -06:00
Abhinav Gupta
152a7bfdf1 Register autocmds once
This commit changes the autocmd registration in vimwiki so that
registration happens once rather than once per extension.

Instead of the following,

    autocmd BufEnter *.md call s:setup_buffer_enter()
    autocmd BufEnter *.mdown call s:setup_buffer_enter()

We'll now only run,

    autocmd BufEnter *.md,*.mdown call s:setup_buffer_enter()

This probably has no effect on performance but it makes for a simpler
implementation.
2019-08-20 19:24:28 -07:00
Rane Brown
50a3c78c87 Ensure key mappings defined in ftplugin are buffer specific.
The changes made with #686 did not ensure the ftplugin mappings were
specific to the buffer containing a Vimwiki file. This resulted in
undesired keymappings with no defined behavior since the <Plug>
definition was buffer specific.
2019-04-29 23:03:00 -06:00
Rane Brown
4106cb7bc7 New option g:vimwiki_key_mappings to enable/disable key mappings.
All key mappings have the option of being disabled but the <Plug>
definitions are still available for user customization. Key sequences
are no longer overwritten if a mapping already exists. Fixes #671,
fixes #425.
2019-04-26 21:17:35 -06:00
Marcelo D Montu
2b6fa274a8 Speed improvement with folding enabled
The 'foldmethod' was being reset every time the cursor entered a vimwiki, causing an unnecessary large delay. So it was changed to set it only the first time the buffer is loaded into a window. This greatly improves performance when switching between vim tabs. Fold settings are also reapplied after using 'diffoff'. Added test/ directory with sample file and instructions for testing this change.

Fixes #580
2019-04-22 07:39:11 -07:00
Rane Brown
510c149512 Add wikilocal option to assign a name to each wiki.
Names can be used for interwiki links in the format wn.name:link.
Additionally, :VimwikiUISelect and the menu created in GVim utilize the
wiki name. Fixes #612, closes #477.
2019-04-21 13:05:01 -06:00
Rane Brown
9d10610c4a Add option g:vimwiki_auto_header to automatically generate H1.
A level 1 header will automatically be generated for new files. The
title used in the header is based on the filename. Closes #245.
2019-04-13 07:00:06 -06:00
Rane Brown
c21de17a34 Fix VimwikiShowVersion function. Closes #654.
Change a:xxx variable to l:xxx since argument variables are immutable as
of Vim patch 888. Convert the stable version number to a string prior to
printing.
2019-04-03 08:39:21 -06:00
Henry Qin
e91150478e Add back a newline in s:get_version()
Fixes #649
2019-04-01 11:02:27 -07:00
Rane Brown
3396e87dbe Fix problems with commands not taking a count and mapping behavior.
Commands such as :VimwikiIndex and :VimwikiDiaryIndex did not previously
take a count and the doucmentation was inconsistent/incorrect for the
behavior of these commands. Fixes #543.
2019-03-31 20:00:37 -07:00
Samir Benmendil
9964026586 Don't override existing mappings 2019-03-19 22:03:50 +00:00
lyokha
5e4a89c898 faster table format on InsertLeave; faster s:get_rows() 2019-03-15 15:31:28 +03:00
Michael F. Schönitzer
394efe4312 Add a command that shows the version or commit
Ref #512
2019-02-01 17:43:05 +01:00
EinfachToll
fdc367f725 Check all user settings for correct type, range etc. 2019-01-19 21:05:27 +01:00
EinfachToll
6a6aeff013 Fix losing the highlight of headers when switching colorschemes
Funnily, the code to fix this was there for over 8 years now, but didn't
work.
2018-10-28 21:04:24 +01:00
EinfachToll
5605f285c1 Fix messing up folding when Vim is in diff mode 2018-08-07 21:39:54 +02:00
EinfachToll
946b3feb12 Fix one-off error when opening a wiki via the menu 2018-05-17 21:47:50 +02:00
EinfachToll
057fa39303 :VimwikiMakeDiaryNote makes a new note in the current wiki
... like the doc says, instead of always using the first wiki.
Also, fix the menu entry, which always led to the wrong diary.

Fix #482
2018-05-17 20:06:27 +02:00
EinfachToll
7c5935b9ba Do init s:vimwiki_autowriteall_saved, but perhaps with the default value
Ref #492
2018-05-15 21:48:58 +02:00
Michael F. Schönitzer
ed58049dbe Revert "set script variable for autowrite_all"
This reverts commit 818fe930c3.
2018-05-14 10:50:41 +02:00
Huy Le
818fe930c3 set script variable for autowrite_all
Ref #492
2018-05-13 15:43:47 +02:00
EinfachToll
9b744b42b1 Fix bug when creating a temporary wiki
Fix #488
2018-05-09 22:03:24 +02:00
EinfachToll
503bc11dd9 Merge branch 'dev' of https://github.com/mMontu/vimwiki into mMontu-dev
Conflicts:
	plugin/vimwiki.vim
2018-04-22 21:24:28 +02:00
EinfachToll
c1dbf90c29 Remove foldmarkers; general reformatting 2018-04-20 07:03:53 +02:00
EinfachToll
3556de54e1 Small refactorings 2018-04-17 07:15:23 +02:00
Brian Gianforcaro
7036561446 Add VimwikiMakeTomorrowDiaryNote
This change introduces a new global diary command "VimwikiMakeTomorrowDiaryNote". The purpose is the
same as VimwikiMakeYesterdayDiaryNote, except it allows
you to create a diary note in the future.

I find this useful when trying to plan my day the night before.
2018-04-14 00:06:51 +02:00
EinfachToll
4bacbe0000 Force vimwiki filetype
Else, Vim decides the filetype according to the file extension.
Ref #440
2018-02-26 07:20:14 +01:00
EinfachToll
b016eab91a Set 'tw' to 99 in all source files. We're not in the middle ages anymore. 2018-02-21 07:11:51 +01:00
EinfachToll
73bda6b9ab Cherry-pick the changes from dev -- part3 2018-02-16 18:11:49 +01:00
EinfachToll
5419fad3f7 Formatting and small refactorings 2018-02-15 18:38:39 +01:00
EinfachToll
f48dce6f1d Refactor then updating of the known wiki pages
for the 'maxhi' option.
2018-02-14 06:53:46 +01:00
EinfachToll
967b342b23 Formatting 2018-02-10 22:04:37 +01:00
EinfachToll
4e16db926f Fix more regression bugs 2017-11-11 21:52:07 +01:00
EinfachToll
fea76ace23 Use new access functions for buffer-local variables
Ref #256
2017-01-13 16:33:41 +01:00
EinfachToll
203fb5b430 Start refactoring the rest -- part 4
Ref #256
2017-01-04 21:53:03 +01:00
EinfachToll
7c98ce3934 Start refactoring the rest -- part 2
Ref #256
2016-12-28 22:17:08 +01:00
EinfachToll
c9104fc2c1 Start refactoring the rest -- part 1
Ref #256
2016-12-25 21:35:56 +01:00
EinfachToll
250fd3c47b Use new access functions for wiki-local variables -- part 5
Ref #256
2016-12-23 20:05:53 +01:00
EinfachToll
2329d602a7 Use new access functions for wiki-local variables -- part 4
Ref #256
2016-12-22 21:00:19 +01:00
EinfachToll
f497a4abc7 Use new access functions for wiki-local variables -- part 3
Ref #256
2016-12-22 19:55:20 +01:00
EinfachToll
61910cd93a Use new access functions for wiki-local variables -- part 2
Ref #256
2016-12-22 19:12:03 +01:00
EinfachToll
6221861957 Use new access functions for wiki-local variables -- part 1
Ref #256
2016-12-22 18:16:05 +01:00
EinfachToll
23ee20887a Use new access functions for global variables -- part 3
Ref #256
2016-12-21 22:11:44 +01:00
EinfachToll
49bdf7fa47 Use new access functions for global variables -- part 2
Ref #256
2016-12-21 21:28:48 +01:00
EinfachToll
e6d997867a Use new access functions for global variables -- part 1
Ref #256
2016-12-21 19:43:34 +01:00
mMontu
777569f95f Workaround for slow folding methods (issue #225) 2016-07-12 11:41:44 -03:00
EinfachToll
2aeaea5f0d Merge pull request #187 from mMontu/nested
Dynamically detect nested syntaxes (fix #128)
2016-01-28 10:29:53 +01:00
mMontu
a2888692fd Option for automatic detection of nested syntaxes 2016-01-27 13:30:30 -02:00