@@ -57,31 +57,31 @@ set completeopt+=longest
5757
5858" Change double-dash to em-dash as it is typed. {{{1
5959if g: notes_smart_quotes && xolox#notes#unicode_enabled ()
60- imap <buffer> -- —
60+ inoremap <buffer> -- —
6161 let b: undo_ftplugin .= ' | execute "iunmap <buffer> --"'
6262endif
6363
6464" Change plain quotes to curly quotes as they're typed. {{{1
6565if g: notes_smart_quotes
66- imap <buffer> <expr> ' xolox#notes#insert_quote(1)
67- imap <buffer> <expr> " xolox#notes#insert_quote(2)
66+ inoremap <buffer> <expr> ' xolox#notes#insert_quote(1)
67+ inoremap <buffer> <expr> " xolox#notes#insert_quote(2)
6868 let b: undo_ftplugin .= ' | execute "iunmap <buffer> '' "'
6969 let b: undo_ftplugin .= ' | execute '' iunmap <buffer> "'' '
7070endif
7171
7272" Change ASCII style arrows to Unicode arrows. {{{1
7373if g: notes_smart_quotes && xolox#notes#unicode_enabled ()
74- imap <buffer> -> →
75- imap <buffer> <- ←
74+ inoremap <buffer> -> →
75+ inoremap <buffer> <- ←
7676 let b: undo_ftplugin .= ' | execute "iunmap <buffer> ->"'
7777 let b: undo_ftplugin .= ' | execute "iunmap <buffer> <-"'
7878endif
7979
8080" Convert ASCII list bullets to Unicode bullets. {{{1
8181if g: notes_smart_quotes
82- imap <buffer> <expr> * xolox#notes#insert_bullet('*')
83- imap <buffer> <expr> - xolox#notes#insert_bullet('-')
84- imap <buffer> <expr> + xolox#notes#insert_bullet('+')
82+ inoremap <buffer> <expr> * xolox#notes#insert_bullet('*')
83+ inoremap <buffer> <expr> - xolox#notes#insert_bullet('-')
84+ inoremap <buffer> <expr> + xolox#notes#insert_bullet('+')
8585 let b: undo_ftplugin .= ' | execute "iunmap <buffer> *"'
8686 let b: undo_ftplugin .= ' | execute "iunmap <buffer> -"'
8787 let b: undo_ftplugin .= ' | execute "iunmap <buffer> +"'
@@ -92,22 +92,22 @@ inoremap <buffer> *** <C-o>:call xolox#notes#insert_ruler()<CR>
9292let b: undo_ftplugin .= ' | execute "iunmap <buffer> ***"'
9393
9494" Indent list items using <Tab> and <Shift-Tab>. {{{1
95- imap <buffer> <silent> <Tab> <C-o> :call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
96- smap <buffer> <silent> <Tab> <C-o> :<C-u> call xolox#notes#indent_list(1, line("'<"), line("'> "))<CR><C-o> gv
95+ inoremap <buffer> <silent> <Tab> <C-o> :call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
96+ snoremap <buffer> <silent> <Tab> <C-o> :<C-u> call xolox#notes#indent_list(1, line("'<"), line("'> "))<CR><C-o> gv
9797let b: undo_ftplugin .= ' | execute "iunmap <buffer> <Tab>"'
9898let b: undo_ftplugin .= ' | execute "sunmap <buffer> <Tab>"'
99- imap <buffer> <silent> <S-Tab> <C-o> :call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
100- smap <buffer> <silent> <S-Tab> <C-o> :<C-u> call xolox#notes#indent_list(-1, line("'<"), line("'> "))<CR><C-o> gv
99+ inoremap <buffer> <silent> <S-Tab> <C-o> :call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
100+ snoremap <buffer> <silent> <S-Tab> <C-o> :<C-u> call xolox#notes#indent_list(-1, line("'<"), line("'> "))<CR><C-o> gv
101101let b: undo_ftplugin .= ' | execute "iunmap <buffer> <S-Tab>"'
102102let b: undo_ftplugin .= ' | execute "sunmap <buffer> <S-Tab>"'
103103
104104" Indent list items using <Alt-Left> and <Alt-Right>. {{{1
105- imap <buffer> <silent> <A-Right> <C-o> :call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
106- smap <buffer> <silent> <A-Right> <C-o> :<C-u> call xolox#notes#indent_list(1, line("'<"), line("'> "))<CR><C-o> gv
105+ inoremap <buffer> <silent> <A-Right> <C-o> :call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
106+ snoremap <buffer> <silent> <A-Right> <C-o> :<C-u> call xolox#notes#indent_list(1, line("'<"), line("'> "))<CR><C-o> gv
107107let b: undo_ftplugin .= ' | execute "iunmap <buffer> <A-Right>"'
108108let b: undo_ftplugin .= ' | execute "sunmap <buffer> <A-Right>"'
109- imap <buffer> <silent> <A-Left> <C-o> :call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
110- smap <buffer> <silent> <A-Left> <C-o> :<C-u> call xolox#notes#indent_list(-1, line("'<"), line("'> "))<CR><C-o> gv
109+ inoremap <buffer> <silent> <A-Left> <C-o> :call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
110+ snoremap <buffer> <silent> <A-Left> <C-o> :<C-u> call xolox#notes#indent_list(-1, line("'<"), line("'> "))<CR><C-o> gv
111111let b: undo_ftplugin .= ' | execute "iunmap <buffer> <A-Left>"'
112112let b: undo_ftplugin .= ' | execute "sunmap <buffer> <A-Left>"'
113113
@@ -117,13 +117,13 @@ let b:undo_ftplugin .= ' | execute "iunmap <buffer> <CR>"'
117117
118118" Shortcuts to create new notes from the selected text. {{{1
119119
120- vmap <buffer> <silent> <Leader> en :NoteFromSelectedText<CR>
120+ vnoremap <buffer> <silent> <Leader> en :NoteFromSelectedText<CR>
121121let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>en"'
122122
123- vmap <buffer> <silent> <Leader> sn :SplitNoteFromSelectedText<CR>
123+ vnoremap <buffer> <silent> <Leader> sn :SplitNoteFromSelectedText<CR>
124124let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>sn"'
125125
126- vmap <buffer> <silent> <Leader> tn :TabNoteFromSelectedText<CR>
126+ vnoremap <buffer> <silent> <Leader> tn :TabNoteFromSelectedText<CR>
127127let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>tn"'
128128
129129" }}}1
0 commit comments