@@ -57,31 +57,31 @@ set completeopt+=longest
57
57
58
58
" Change double-dash to em-dash as it is typed. {{{1
59
59
if g: notes_smart_quotes && xolox#notes#unicode_enabled ()
60
- imap <buffer> -- —
60
+ inoremap <buffer> -- —
61
61
let b: undo_ftplugin .= ' | execute "iunmap <buffer> --"'
62
62
endif
63
63
64
64
" Change plain quotes to curly quotes as they're typed. {{{1
65
65
if 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)
68
68
let b: undo_ftplugin .= ' | execute "iunmap <buffer> '' "'
69
69
let b: undo_ftplugin .= ' | execute '' iunmap <buffer> "'' '
70
70
endif
71
71
72
72
" Change ASCII style arrows to Unicode arrows. {{{1
73
73
if g: notes_smart_quotes && xolox#notes#unicode_enabled ()
74
- imap <buffer> -> →
75
- imap <buffer> <- ←
74
+ inoremap <buffer> -> →
75
+ inoremap <buffer> <- ←
76
76
let b: undo_ftplugin .= ' | execute "iunmap <buffer> ->"'
77
77
let b: undo_ftplugin .= ' | execute "iunmap <buffer> <-"'
78
78
endif
79
79
80
80
" Convert ASCII list bullets to Unicode bullets. {{{1
81
81
if 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('+')
85
85
let b: undo_ftplugin .= ' | execute "iunmap <buffer> *"'
86
86
let b: undo_ftplugin .= ' | execute "iunmap <buffer> -"'
87
87
let b: undo_ftplugin .= ' | execute "iunmap <buffer> +"'
@@ -92,22 +92,22 @@ inoremap <buffer> *** <C-o>:call xolox#notes#insert_ruler()<CR>
92
92
let b: undo_ftplugin .= ' | execute "iunmap <buffer> ***"'
93
93
94
94
" 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
97
97
let b: undo_ftplugin .= ' | execute "iunmap <buffer> <Tab>"'
98
98
let 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
101
101
let b: undo_ftplugin .= ' | execute "iunmap <buffer> <S-Tab>"'
102
102
let b: undo_ftplugin .= ' | execute "sunmap <buffer> <S-Tab>"'
103
103
104
104
" 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
107
107
let b: undo_ftplugin .= ' | execute "iunmap <buffer> <A-Right>"'
108
108
let 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
111
111
let b: undo_ftplugin .= ' | execute "iunmap <buffer> <A-Left>"'
112
112
let b: undo_ftplugin .= ' | execute "sunmap <buffer> <A-Left>"'
113
113
@@ -117,13 +117,13 @@ let b:undo_ftplugin .= ' | execute "iunmap <buffer> <CR>"'
117
117
118
118
" Shortcuts to create new notes from the selected text. {{{1
119
119
120
- vmap <buffer> <silent> <Leader> en :NoteFromSelectedText<CR>
120
+ vnoremap <buffer> <silent> <Leader> en :NoteFromSelectedText<CR>
121
121
let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>en"'
122
122
123
- vmap <buffer> <silent> <Leader> sn :SplitNoteFromSelectedText<CR>
123
+ vnoremap <buffer> <silent> <Leader> sn :SplitNoteFromSelectedText<CR>
124
124
let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>sn"'
125
125
126
- vmap <buffer> <silent> <Leader> tn :TabNoteFromSelectedText<CR>
126
+ vnoremap <buffer> <silent> <Leader> tn :TabNoteFromSelectedText<CR>
127
127
let b: undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>tn"'
128
128
129
129
" }}}1
0 commit comments