Permalink
Browse files

Use *noremap flavor commands to create mappings.

  • Loading branch information...
1 parent 8881d41 commit 563ddd68062944811c4686b203479e8870c563e2 @sharat87 sharat87 committed Mar 15, 2013
Showing with 19 additions and 19 deletions.
  1. +19 −19 ftplugin/notes.vim
View
@@ -57,31 +57,31 @@ set completeopt+=longest
" Change double-dash to em-dash as it is typed. {{{1
if g:notes_smart_quotes && xolox#notes#unicode_enabled()
- imap <buffer> --
+ inoremap <buffer> --
let b:undo_ftplugin .= ' | execute "iunmap <buffer> --"'
endif
" Change plain quotes to curly quotes as they're typed. {{{1
if g:notes_smart_quotes
- imap <buffer> <expr> ' xolox#notes#insert_quote(1)
- imap <buffer> <expr> " xolox#notes#insert_quote(2)
+ inoremap <buffer> <expr> ' xolox#notes#insert_quote(1)
+ inoremap <buffer> <expr> " xolox#notes#insert_quote(2)
let b:undo_ftplugin .= ' | execute "iunmap <buffer> ''"'
let b:undo_ftplugin .= ' | execute ''iunmap <buffer> "'''
endif
" Change ASCII style arrows to Unicode arrows. {{{1
if g:notes_smart_quotes && xolox#notes#unicode_enabled()
- imap <buffer> -> →
- imap <buffer> <-
+ inoremap <buffer> -> →
+ inoremap <buffer> <-
let b:undo_ftplugin .= ' | execute "iunmap <buffer> ->"'
let b:undo_ftplugin .= ' | execute "iunmap <buffer> <-"'
endif
" Convert ASCII list bullets to Unicode bullets. {{{1
if g:notes_smart_quotes
- imap <buffer> <expr> * xolox#notes#insert_bullet('*')
- imap <buffer> <expr> - xolox#notes#insert_bullet('-')
- imap <buffer> <expr> + xolox#notes#insert_bullet('+')
+ inoremap <buffer> <expr> * xolox#notes#insert_bullet('*')
+ inoremap <buffer> <expr> - xolox#notes#insert_bullet('-')
+ inoremap <buffer> <expr> + xolox#notes#insert_bullet('+')
let b:undo_ftplugin .= ' | execute "iunmap <buffer> *"'
let b:undo_ftplugin .= ' | execute "iunmap <buffer> -"'
let b:undo_ftplugin .= ' | execute "iunmap <buffer> +"'
@@ -92,22 +92,22 @@ inoremap <buffer> *** <C-o>:call xolox#notes#insert_ruler()<CR>
let b:undo_ftplugin .= ' | execute "iunmap <buffer> ***"'
" Indent list items using <Tab> and <Shift-Tab>. {{{1
-imap <buffer> <silent> <Tab> <C-o>:call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
-smap <buffer> <silent> <Tab> <C-o>:<C-u>call xolox#notes#indent_list(1, line("'<"), line("'>"))<CR><C-o>gv
+inoremap <buffer> <silent> <Tab> <C-o>:call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
+snoremap <buffer> <silent> <Tab> <C-o>:<C-u>call xolox#notes#indent_list(1, line("'<"), line("'>"))<CR><C-o>gv
let b:undo_ftplugin .= ' | execute "iunmap <buffer> <Tab>"'
let b:undo_ftplugin .= ' | execute "sunmap <buffer> <Tab>"'
-imap <buffer> <silent> <S-Tab> <C-o>:call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
-smap <buffer> <silent> <S-Tab> <C-o>:<C-u>call xolox#notes#indent_list(-1, line("'<"), line("'>"))<CR><C-o>gv
+inoremap <buffer> <silent> <S-Tab> <C-o>:call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
+snoremap <buffer> <silent> <S-Tab> <C-o>:<C-u>call xolox#notes#indent_list(-1, line("'<"), line("'>"))<CR><C-o>gv
let b:undo_ftplugin .= ' | execute "iunmap <buffer> <S-Tab>"'
let b:undo_ftplugin .= ' | execute "sunmap <buffer> <S-Tab>"'
" Indent list items using <Alt-Left> and <Alt-Right>. {{{1
-imap <buffer> <silent> <A-Right> <C-o>:call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
-smap <buffer> <silent> <A-Right> <C-o>:<C-u>call xolox#notes#indent_list(1, line("'<"), line("'>"))<CR><C-o>gv
+inoremap <buffer> <silent> <A-Right> <C-o>:call xolox#notes#indent_list(1, line('.'), line('.'))<CR>
+snoremap <buffer> <silent> <A-Right> <C-o>:<C-u>call xolox#notes#indent_list(1, line("'<"), line("'>"))<CR><C-o>gv
let b:undo_ftplugin .= ' | execute "iunmap <buffer> <A-Right>"'
let b:undo_ftplugin .= ' | execute "sunmap <buffer> <A-Right>"'
-imap <buffer> <silent> <A-Left> <C-o>:call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
-smap <buffer> <silent> <A-Left> <C-o>:<C-u>call xolox#notes#indent_list(-1, line("'<"), line("'>"))<CR><C-o>gv
+inoremap <buffer> <silent> <A-Left> <C-o>:call xolox#notes#indent_list(-1, line('.'), line('.'))<CR>
+snoremap <buffer> <silent> <A-Left> <C-o>:<C-u>call xolox#notes#indent_list(-1, line("'<"), line("'>"))<CR><C-o>gv
let b:undo_ftplugin .= ' | execute "iunmap <buffer> <A-Left>"'
let b:undo_ftplugin .= ' | execute "sunmap <buffer> <A-Left>"'
@@ -117,13 +117,13 @@ let b:undo_ftplugin .= ' | execute "iunmap <buffer> <CR>"'
" Shortcuts to create new notes from the selected text. {{{1
-vmap <buffer> <silent> <Leader>en :NoteFromSelectedText<CR>
+vnoremap <buffer> <silent> <Leader>en :NoteFromSelectedText<CR>
let b:undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>en"'
-vmap <buffer> <silent> <Leader>sn :SplitNoteFromSelectedText<CR>
+vnoremap <buffer> <silent> <Leader>sn :SplitNoteFromSelectedText<CR>
let b:undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>sn"'
-vmap <buffer> <silent> <Leader>tn :TabNoteFromSelectedText<CR>
+vnoremap <buffer> <silent> <Leader>tn :TabNoteFromSelectedText<CR>
let b:undo_ftplugin .= ' | execute "vunmap <buffer> <Leader>tn"'
" }}}1

0 comments on commit 563ddd6

Please sign in to comment.