Remove foldmarkers; general reformatting
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:foldmethod=marker:textwidth=99
|
||||
" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99
|
||||
" Vimwiki filetype plugin file
|
||||
" Home: https://github.com/vimwiki/vimwiki/
|
||||
|
||||
@ -8,7 +8,6 @@ endif
|
||||
let b:did_ftplugin = 1 " Don't load another plugin for this buffer
|
||||
|
||||
|
||||
" MISC STUFF {{{
|
||||
|
||||
setlocal commentstring=%%%s
|
||||
|
||||
@ -16,16 +15,14 @@ if vimwiki#vars#get_global('conceallevel') && exists("+conceallevel")
|
||||
let &l:conceallevel = vimwiki#vars#get_global('conceallevel')
|
||||
endif
|
||||
|
||||
" GOTO FILE: gf {{{
|
||||
" This is for GOTO FILE: gf
|
||||
execute 'setlocal suffixesadd='.vimwiki#vars#get_wikilocal('ext')
|
||||
setlocal isfname-=[,]
|
||||
" gf}}}
|
||||
|
||||
exe "setlocal tags+=" . escape(vimwiki#tags#metadata_file_path(), ' \|"')
|
||||
|
||||
" MISC }}}
|
||||
|
||||
" COMPLETION {{{
|
||||
|
||||
function! Complete_wikifiles(findstart, base)
|
||||
if a:findstart == 1
|
||||
let column = col('.')-2
|
||||
@ -116,9 +113,9 @@ function! Complete_wikifiles(findstart, base)
|
||||
endfunction
|
||||
|
||||
setlocal omnifunc=Complete_wikifiles
|
||||
" COMPLETION }}}
|
||||
|
||||
" LIST STUFF {{{
|
||||
|
||||
|
||||
" settings necessary for the automatic formatting of lists
|
||||
setlocal autoindent
|
||||
setlocal nosmartindent
|
||||
@ -130,7 +127,6 @@ setlocal formatoptions-=o
|
||||
setlocal formatoptions-=2
|
||||
setlocal formatoptions+=n
|
||||
|
||||
"Create 'formatlistpat'
|
||||
let &formatlistpat = vimwiki#vars#get_syntaxlocal('rxListItem')
|
||||
|
||||
if !empty(&langmap)
|
||||
@ -146,17 +142,18 @@ if !empty(&langmap)
|
||||
endif
|
||||
endif
|
||||
|
||||
" LIST STUFF }}}
|
||||
|
||||
" FOLDING {{{
|
||||
" Folding list items {{{
|
||||
function! VimwikiFoldListLevel(lnum) "{{{
|
||||
|
||||
" ------------------------------------------------
|
||||
" Folding stuff
|
||||
" ------------------------------------------------
|
||||
|
||||
function! VimwikiFoldListLevel(lnum)
|
||||
return vimwiki#lst#fold_level(a:lnum)
|
||||
endfunction "}}}
|
||||
" Folding list items }}}
|
||||
endfunction
|
||||
|
||||
" Folding sections and code blocks {{{
|
||||
function! VimwikiFoldLevel(lnum) "{{{
|
||||
|
||||
function! VimwikiFoldLevel(lnum)
|
||||
let line = getline(a:lnum)
|
||||
|
||||
" Header/section folding...
|
||||
@ -170,26 +167,29 @@ function! VimwikiFoldLevel(lnum) "{{{
|
||||
else
|
||||
return "="
|
||||
endif
|
||||
endfunction
|
||||
|
||||
endfunction "}}}
|
||||
|
||||
" Constants used by VimwikiFoldText {{{
|
||||
" Constants used by VimwikiFoldText
|
||||
" use \u2026 and \u21b2 (or \u2424) if enc=utf-8 to save screen space
|
||||
let s:ellipsis = (&enc ==? 'utf-8') ? "\u2026" : "..."
|
||||
let s:ell_len = strlen(s:ellipsis)
|
||||
let s:newline = (&enc ==? 'utf-8') ? "\u21b2 " : " "
|
||||
let s:tolerance = 5
|
||||
" }}}
|
||||
|
||||
function! s:shorten_text_simple(text, len) "{{{ unused
|
||||
|
||||
" unused
|
||||
function! s:shorten_text_simple(text, len)
|
||||
let spare_len = a:len - len(a:text)
|
||||
return (spare_len>=0) ? [a:text,spare_len] : [a:text[0:a:len].s:ellipsis, -1]
|
||||
endfunction "}}}
|
||||
endfunction
|
||||
|
||||
|
||||
" s:shorten_text(text, len) = [string, spare] with "spare" = len-strlen(string)
|
||||
" for long enough "text", the string's length is within s:tolerance of "len"
|
||||
" (so that -s:tolerance <= spare <= s:tolerance, "string" ends with s:ellipsis)
|
||||
function! s:shorten_text(text, len) "{{{ returns [string, spare]
|
||||
function! s:shorten_text(text, len)
|
||||
" returns [string, spare]
|
||||
" strlen() returns lenght in bytes, not in characters, so we'll have to do a
|
||||
" trick here -- replace all non-spaces with dot, calculate lengths and
|
||||
" indexes on it, then use original string to break at selected index.
|
||||
@ -202,11 +202,11 @@ function! s:shorten_text(text, len) "{{{ returns [string, spare]
|
||||
let newlen = a:len - s:ell_len
|
||||
let idx = strridx(text_pattern, ' ', newlen + s:tolerance)
|
||||
let break_idx = (idx + s:tolerance >= newlen) ? idx : newlen
|
||||
return [matchstr(a:text, '\m^.\{'.break_idx.'\}').s:ellipsis,
|
||||
\ newlen - break_idx]
|
||||
endfunction "}}}
|
||||
return [matchstr(a:text, '\m^.\{'.break_idx.'\}').s:ellipsis, newlen - break_idx]
|
||||
endfunction
|
||||
|
||||
function! VimwikiFoldText() "{{{
|
||||
|
||||
function! VimwikiFoldText()
|
||||
let line = getline(v:foldstart)
|
||||
let main_text = substitute(line, '^\s*', repeat(' ',indent(v:foldstart)), '')
|
||||
let fold_len = v:foldend - v:foldstart + 1
|
||||
@ -226,12 +226,14 @@ function! VimwikiFoldText() "{{{
|
||||
endif
|
||||
return main_text.len_text.content_text
|
||||
endif
|
||||
endfunction "}}}
|
||||
endfunction
|
||||
|
||||
" Folding sections and code blocks }}}
|
||||
" FOLDING }}}
|
||||
|
||||
" COMMANDS {{{
|
||||
|
||||
" ------------------------------------------------
|
||||
" Commands
|
||||
" ------------------------------------------------
|
||||
|
||||
command! -buffer Vimwiki2HTML
|
||||
\ if filewritable(expand('%')) | silent noautocmd w | endif
|
||||
\ <bar>
|
||||
@ -289,7 +291,8 @@ command! -buffer -range -nargs=1 VimwikiListChangeSymbolI
|
||||
command! -buffer -nargs=1 VimwikiChangeSymbolInListTo
|
||||
\ call vimwiki#lst#change_marker_in_list(<f-args>)
|
||||
command! -buffer -range VimwikiToggleListItem call vimwiki#lst#toggle_cb(<line1>, <line2>)
|
||||
command! -buffer -range VimwikiToggleRejectedListItem call vimwiki#lst#toggle_rejected_cb(<line1>, <line2>)
|
||||
command! -buffer -range VimwikiToggleRejectedListItem
|
||||
\ call vimwiki#lst#toggle_rejected_cb(<line1>, <line2>)
|
||||
command! -buffer -range VimwikiIncrementListItem call vimwiki#lst#increment_cb(<line1>, <line2>)
|
||||
command! -buffer -range VimwikiDecrementListItem call vimwiki#lst#decrement_cb(<line1>, <line2>)
|
||||
command! -buffer -range -nargs=+ VimwikiListChangeLvl
|
||||
@ -312,20 +315,25 @@ command! -buffer VimwikiDiaryNextDay call vimwiki#diary#goto_next_day()
|
||||
command! -buffer VimwikiDiaryPrevDay call vimwiki#diary#goto_prev_day()
|
||||
|
||||
" tags commands
|
||||
command! -buffer -bang
|
||||
\ VimwikiRebuildTags call vimwiki#tags#update_tags(1, '<bang>')
|
||||
command! -buffer -bang VimwikiRebuildTags call vimwiki#tags#update_tags(1, '<bang>')
|
||||
command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags
|
||||
\ VimwikiSearchTags VimwikiSearch /:<args>:/
|
||||
command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags
|
||||
\ VimwikiGenerateTags call vimwiki#tags#generate_tags(<f-args>)
|
||||
|
||||
" COMMANDS }}}
|
||||
command! -buffer VimwikiPasteUrl call vimwiki#html#PasteUrl(expand('%:p'))
|
||||
command! -buffer VimwikiCatUrl call vimwiki#html#CatUrl(expand('%:p'))
|
||||
|
||||
|
||||
" ------------------------------------------------
|
||||
" Keybindings
|
||||
" ------------------------------------------------
|
||||
|
||||
" KEYBINDINGS {{{
|
||||
if vimwiki#vars#get_global('use_mouse')
|
||||
nmap <buffer> <S-LeftMouse> <NOP>
|
||||
nmap <buffer> <C-LeftMouse> <NOP>
|
||||
nnoremap <silent><buffer> <2-LeftMouse> :call vimwiki#base#follow_link('nosplit', 0, 1, "\<lt>2-LeftMouse>")<CR>
|
||||
nnoremap <silent><buffer> <2-LeftMouse>
|
||||
\ :call vimwiki#base#follow_link('nosplit', 0, 1, "\<lt>2-LeftMouse>")<CR>
|
||||
nnoremap <silent><buffer> <S-2-LeftMouse> <LeftMouse>:VimwikiSplitLink<CR>
|
||||
nnoremap <silent><buffer> <C-2-LeftMouse> <LeftMouse>:VimwikiVSplitLink<CR>
|
||||
nnoremap <silent><buffer> <RightMouse><LeftMouse> :VimwikiGoBackLink<CR>
|
||||
@ -335,44 +343,37 @@ endif
|
||||
if !hasmapto('<Plug>Vimwiki2HTML')
|
||||
exe 'nmap <buffer> '.vimwiki#vars#get_global('map_prefix').'h <Plug>Vimwiki2HTML'
|
||||
endif
|
||||
nnoremap <script><buffer>
|
||||
\ <Plug>Vimwiki2HTML :Vimwiki2HTML<CR>
|
||||
nnoremap <script><buffer> <Plug>Vimwiki2HTML :Vimwiki2HTML<CR>
|
||||
|
||||
if !hasmapto('<Plug>Vimwiki2HTMLBrowse')
|
||||
exe 'nmap <buffer> '.vimwiki#vars#get_global('map_prefix').'hh <Plug>Vimwiki2HTMLBrowse'
|
||||
endif
|
||||
nnoremap <script><buffer>
|
||||
\ <Plug>Vimwiki2HTMLBrowse :Vimwiki2HTMLBrowse<CR>
|
||||
nnoremap <script><buffer> <Plug>Vimwiki2HTMLBrowse :Vimwiki2HTMLBrowse<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiFollowLink')
|
||||
nmap <silent><buffer> <CR> <Plug>VimwikiFollowLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiFollowLink :VimwikiFollowLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiFollowLink :VimwikiFollowLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiSplitLink')
|
||||
nmap <silent><buffer> <S-CR> <Plug>VimwikiSplitLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiSplitLink :VimwikiSplitLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiSplitLink :VimwikiSplitLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiVSplitLink')
|
||||
nmap <silent><buffer> <C-CR> <Plug>VimwikiVSplitLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiVSplitLink :VimwikiVSplitLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiVSplitLink :VimwikiVSplitLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiNormalizeLink')
|
||||
nmap <silent><buffer> + <Plug>VimwikiNormalizeLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiNormalizeLink :VimwikiNormalizeLink 0<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiNormalizeLink :VimwikiNormalizeLink 0<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiNormalizeLinkVisual')
|
||||
vmap <silent><buffer> + <Plug>VimwikiNormalizeLinkVisual
|
||||
endif
|
||||
vnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiNormalizeLinkVisual :<C-U>VimwikiNormalizeLink 1<CR>
|
||||
vnoremap <silent><script><buffer> <Plug>VimwikiNormalizeLinkVisual :<C-U>VimwikiNormalizeLink 1<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiNormalizeLinkVisualCR')
|
||||
vmap <silent><buffer> <CR> <Plug>VimwikiNormalizeLinkVisualCR
|
||||
@ -384,50 +385,42 @@ if !hasmapto('<Plug>VimwikiTabnewLink')
|
||||
nmap <silent><buffer> <D-CR> <Plug>VimwikiTabnewLink
|
||||
nmap <silent><buffer> <C-S-CR> <Plug>VimwikiTabnewLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiTabnewLink :VimwikiTabnewLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiTabnewLink :VimwikiTabnewLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiGoBackLink')
|
||||
nmap <silent><buffer> <BS> <Plug>VimwikiGoBackLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiGoBackLink :VimwikiGoBackLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiGoBackLink :VimwikiGoBackLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiNextLink')
|
||||
nmap <silent><buffer> <TAB> <Plug>VimwikiNextLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiNextLink :VimwikiNextLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiNextLink :VimwikiNextLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiPrevLink')
|
||||
nmap <silent><buffer> <S-TAB> <Plug>VimwikiPrevLink
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiPrevLink :VimwikiPrevLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiPrevLink :VimwikiPrevLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDeleteLink')
|
||||
exe 'nmap <silent><buffer> '.vimwiki#vars#get_global('map_prefix').'d <Plug>VimwikiDeleteLink'
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDeleteLink :VimwikiDeleteLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiDeleteLink :VimwikiDeleteLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiRenameLink')
|
||||
exe 'nmap <silent><buffer> '.vimwiki#vars#get_global('map_prefix').'r <Plug>VimwikiRenameLink'
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRenameLink :VimwikiRenameLink<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiRenameLink :VimwikiRenameLink<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDiaryNextDay')
|
||||
nmap <silent><buffer> <C-Down> <Plug>VimwikiDiaryNextDay
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDiaryNextDay :VimwikiDiaryNextDay<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiDiaryNextDay :VimwikiDiaryNextDay<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDiaryPrevDay')
|
||||
nmap <silent><buffer> <C-Up> <Plug>VimwikiDiaryPrevDay
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDiaryPrevDay :VimwikiDiaryPrevDay<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiDiaryPrevDay :VimwikiDiaryPrevDay<CR>
|
||||
|
||||
" List mappings
|
||||
if !hasmapto('<Plug>VimwikiToggleListItem')
|
||||
@ -442,10 +435,8 @@ if !hasmapto('<Plug>VimwikiToggleRejectedListItem')
|
||||
nmap <silent><buffer> glx <Plug>VimwikiToggleRejectedListItem
|
||||
vmap <silent><buffer> glx <Plug>VimwikiToggleRejectedListItem
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiToggleListItem :VimwikiToggleListItem<CR>
|
||||
vnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiToggleListItem :VimwikiToggleListItem<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiToggleListItem :VimwikiToggleListItem<CR>
|
||||
vnoremap <silent><script><buffer> <Plug>VimwikiToggleListItem :VimwikiToggleListItem<CR>
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiToggleRejectedListItem :VimwikiToggleRejectedListItem<CR>
|
||||
vnoremap <silent><script><buffer>
|
||||
@ -459,39 +450,31 @@ if !hasmapto('<Plug>VimwikiDecrementListItem')
|
||||
nmap <silent><buffer> glp <Plug>VimwikiDecrementListItem
|
||||
vmap <silent><buffer> glp <Plug>VimwikiDecrementListItem
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiIncrementListItem :VimwikiIncrementListItem<CR>
|
||||
vnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiIncrementListItem :VimwikiIncrementListItem<CR>
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDecrementListItem :VimwikiDecrementListItem<CR>
|
||||
vnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiDecrementListItem :VimwikiDecrementListItem<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiIncrementListItem :VimwikiIncrementListItem<CR>
|
||||
vnoremap <silent><script><buffer> <Plug>VimwikiIncrementListItem :VimwikiIncrementListItem<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiDecrementListItem :VimwikiDecrementListItem<CR>
|
||||
vnoremap <silent><script><buffer> <Plug>VimwikiDecrementListItem :VimwikiDecrementListItem<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDecreaseLvlSingleItem', 'i')
|
||||
imap <silent><buffer> <C-D>
|
||||
\ <Plug>VimwikiDecreaseLvlSingleItem
|
||||
imap <silent><buffer> <C-D> <Plug>VimwikiDecreaseLvlSingleItem
|
||||
endif
|
||||
inoremap <silent><script><buffer> <Plug>VimwikiDecreaseLvlSingleItem
|
||||
\ <C-O>:VimwikiListChangeLvl decrease 0<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiIncreaseLvlSingleItem', 'i')
|
||||
imap <silent><buffer> <C-T>
|
||||
\ <Plug>VimwikiIncreaseLvlSingleItem
|
||||
imap <silent><buffer> <C-T> <Plug>VimwikiIncreaseLvlSingleItem
|
||||
endif
|
||||
inoremap <silent><script><buffer> <Plug>VimwikiIncreaseLvlSingleItem
|
||||
\ <C-O>:VimwikiListChangeLvl increase 0<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiListNextSymbol', 'i')
|
||||
imap <silent><buffer> <C-L><C-J>
|
||||
\ <Plug>VimwikiListNextSymbol
|
||||
imap <silent><buffer> <C-L><C-J> <Plug>VimwikiListNextSymbol
|
||||
endif
|
||||
inoremap <silent><script><buffer> <Plug>VimwikiListNextSymbol
|
||||
\ <C-O>:VimwikiListChangeSymbolI next<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiListPrevSymbol', 'i')
|
||||
imap <silent><buffer> <C-L><C-K>
|
||||
\ <Plug>VimwikiListPrevSymbol
|
||||
imap <silent><buffer> <C-L><C-K> <Plug>VimwikiListPrevSymbol
|
||||
endif
|
||||
inoremap <silent><script><buffer> <Plug>VimwikiListPrevSymbol
|
||||
\ <C-O>:VimwikiListChangeSymbolI prev<CR>
|
||||
@ -507,15 +490,13 @@ nnoremap <silent> <buffer> O :<C-U>call vimwiki#lst#kbd_O()<CR>
|
||||
if !hasmapto('<Plug>VimwikiRenumberList')
|
||||
nmap <silent><buffer> glr <Plug>VimwikiRenumberList
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRenumberList :VimwikiRenumberList<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiRenumberList :VimwikiRenumberList<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiRenumberAllLists')
|
||||
nmap <silent><buffer> gLr <Plug>VimwikiRenumberAllLists
|
||||
nmap <silent><buffer> gLR <Plug>VimwikiRenumberAllLists
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRenumberAllLists :VimwikiRenumberAllLists<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiRenumberAllLists :VimwikiRenumberAllLists<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiDecreaseLvlSingleItem')
|
||||
map <silent><buffer> glh <Plug>VimwikiDecreaseLvlSingleItem
|
||||
@ -546,14 +527,12 @@ noremap <silent><script><buffer>
|
||||
if !hasmapto('<Plug>VimwikiRemoveSingleCB')
|
||||
map <silent><buffer> gl<Space> <Plug>VimwikiRemoveSingleCB
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRemoveSingleCB :VimwikiRemoveSingleCB<CR>
|
||||
noremap <silent><script><buffer> <Plug>VimwikiRemoveSingleCB :VimwikiRemoveSingleCB<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiRemoveCBInList')
|
||||
map <silent><buffer> gL<Space> <Plug>VimwikiRemoveCBInList
|
||||
endif
|
||||
noremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiRemoveCBInList :VimwikiRemoveCBInList<CR>
|
||||
noremap <silent><script><buffer> <Plug>VimwikiRemoveCBInList :VimwikiRemoveCBInList<CR>
|
||||
|
||||
for s:char in vimwiki#vars#get_syntaxlocal('bullet_types')
|
||||
if !hasmapto(':VimwikiChangeSymbolTo '.s:char.'<CR>')
|
||||
@ -574,8 +553,7 @@ for s:typ in vimwiki#vars#get_syntaxlocal('number_types')
|
||||
endfor
|
||||
|
||||
|
||||
|
||||
function! s:CR(normal, just_mrkr) "{{{
|
||||
function! s:CR(normal, just_mrkr)
|
||||
if vimwiki#vars#get_global('table_mappings')
|
||||
let res = vimwiki#tbl#kbd_cr()
|
||||
if res != ""
|
||||
@ -585,7 +563,7 @@ function! s:CR(normal, just_mrkr) "{{{
|
||||
endif
|
||||
endif
|
||||
call vimwiki#lst#kbd_cr(a:normal, a:just_mrkr)
|
||||
endfunction "}}}
|
||||
endfunction
|
||||
|
||||
if !hasmapto('VimwikiReturn', 'i')
|
||||
if maparg('<CR>', 'i') !~? '<Esc>:VimwikiReturn'
|
||||
@ -609,8 +587,7 @@ nnoremap <buffer> gww :VimwikiTableAlignW<CR>
|
||||
if !hasmapto('<Plug>VimwikiTableMoveColumnLeft')
|
||||
nmap <silent><buffer> <A-Left> <Plug>VimwikiTableMoveColumnLeft
|
||||
endif
|
||||
nnoremap <silent><script><buffer>
|
||||
\ <Plug>VimwikiTableMoveColumnLeft :VimwikiTableMoveColumnLeft<CR>
|
||||
nnoremap <silent><script><buffer> <Plug>VimwikiTableMoveColumnLeft :VimwikiTableMoveColumnLeft<CR>
|
||||
if !hasmapto('<Plug>VimwikiTableMoveColumnRight')
|
||||
nmap <silent><buffer> <A-Right> <Plug>VimwikiTableMoveColumnRight
|
||||
endif
|
||||
@ -619,7 +596,10 @@ nnoremap <silent><script><buffer>
|
||||
|
||||
|
||||
|
||||
" Text objects {{{
|
||||
" ------------------------------------------------
|
||||
" Text objects
|
||||
" ------------------------------------------------
|
||||
|
||||
onoremap <silent><buffer> ah :<C-U>call vimwiki#base#TO_header(0, 0, v:count1)<CR>
|
||||
vnoremap <silent><buffer> ah :<C-U>call vimwiki#base#TO_header(0, 0, v:count1)<CR>
|
||||
|
||||
@ -653,8 +633,7 @@ vnoremap <silent><buffer> il :<C-U>call vimwiki#lst#TO_list_item(1, 1)<CR>
|
||||
if !hasmapto('<Plug>VimwikiAddHeaderLevel')
|
||||
nmap <silent><buffer> = <Plug>VimwikiAddHeaderLevel
|
||||
endif
|
||||
nnoremap <silent><buffer> <Plug>VimwikiAddHeaderLevel :
|
||||
\<C-U>call vimwiki#base#AddHeaderLevel()<CR>
|
||||
nnoremap <silent><buffer> <Plug>VimwikiAddHeaderLevel :<C-U>call vimwiki#base#AddHeaderLevel()<CR>
|
||||
|
||||
if !hasmapto('<Plug>VimwikiRemoveHeaderLevel')
|
||||
nmap <silent><buffer> - <Plug>VimwikiRemoveHeaderLevel
|
||||
@ -693,11 +672,8 @@ endif
|
||||
nnoremap <silent><buffer> <Plug>VimwikiGoToPrevSiblingHeader :
|
||||
\<C-u>call vimwiki#base#goto_sibling(-1)<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
" KEYBINDINGS }}}
|
||||
|
||||
" AUTOCOMMANDS {{{
|
||||
if vimwiki#vars#get_wikilocal('auto_export')
|
||||
" Automatically generate HTML on page write.
|
||||
augroup vimwiki
|
||||
@ -720,10 +696,4 @@ if vimwiki#vars#get_wikilocal('auto_tags')
|
||||
au BufWritePost <buffer> call vimwiki#tags#update_tags(0, '')
|
||||
augroup END
|
||||
endif
|
||||
" AUTOCOMMANDS }}}
|
||||
|
||||
" PASTE, CAT URL {{{
|
||||
" html commands
|
||||
command! -buffer VimwikiPasteUrl call vimwiki#html#PasteUrl(expand('%:p'))
|
||||
command! -buffer VimwikiCatUrl call vimwiki#html#CatUrl(expand('%:p'))
|
||||
" }}}
|
||||
|
Reference in New Issue
Block a user