nnoremap j gj nnoremap gj j nnoremap k gk nnoremap gk k nnoremap $ g$ nnoremap g$ $ vnoremap j gj vnoremap gj j vnoremap k gk vnoremap gk k vnoremap $ g$ vnoremap g$ $ nnoremap } }zz nnoremap { {zz nnoremap ]] ]]zz nnoremap [[ [[zz nnoremap [] []zz nnoremap ][ ][zz nnoremap }zz " See: http://qiita.com/itmammoth/items/312246b4b7688875d023 nnoremap "zdd"zp vnoremap "zx"zP`[V`] nnoremap "zdd"zP vnoremap "zx"zp`[V`] noremap! OA noremap! OB noremap! OC noremap! OD noremap! A noremap! B noremap! C noremap! D nnoremap > nnoremap - nnoremap < nnoremap + nnoremap ge :tabedit. nnoremap gc :tablast tabnew nnoremap gn :tabnew nnoremap gx :tabclose nnoremap gn :tabnext nnoremap :tabnext nnoremap gp :tabprevious nnoremap :tabprevious inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " tab jump for s:n in range(1, 9) execute 'nnoremap g' . s:n ':tabnext' . s:n . '' endfor inoremap jj `^ cnoremap jj `^ inoremap `^ inoremap `^ inoremap `^ inoremap j cnoremap j nnoremap gp op^ nnoremap gP OP^ xnoremap gp op^ xnoremap gP OP^ for s:k in range(1, 9) execute 'nnoremap ' . s:k ':e #' . s:k . '' endfor inoremap inoremap ^c$ inoremap inoremap inoremap inoremap inoremap inoremap inoremap inoremap inoremap :set paste*:set nopaste vnoremap "+y if g:env.neo inoremap :set paste*:set nopaste vnoremap "+y endif inoremap . . inoremap : : inoremap inoremap nnoremap 0 \ col('.') ==# 1 ? '^' : '0' nnoremap ^ nnoremap $ nnoremap _ :sp . nnoremap :vsp . noremap + noremap - vnoremap gv vnoremap gv if !g:env.win nnoremap ,h :call maxmellon#load_help() :help else nnoremap ,h :help endif inoremap maxmellon#indent_braces() inoremap , , nnoremap ,x :call maxmellon#remove_whitespace() vnoremap ,x :call maxmellon#remove_whitespace() nnoremap ,z :%s/ / /g vnoremap ,z :%s/ / /g nnoremap ,o :Opener nnoremap ,g :Google nnoremap ,p :ToggleOpt paste nnoremap sub :%s///gc xnoremap s :'<,'>s///gc nnoremap ;; q: nnoremap q; q: vnoremap q; q: nnoremap ; : vnoremap ; : nnoremap : ; vnoremap : ; cnoremap cnoremap cnoremap j getcmdline()[getcmdpos()-2] ==# 'j' ? "\\" : 'j' nnoremap / q/ nnoremap ? q? cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap augroup CmdWindow autocmd! autocmd CmdwinEnter * call s:init_cmdwin() augroup END function! s:init_cmdwin() nnoremap q :q nnoremap A inoremap inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\\" : "\" inoremap pumvisible() ? "\" : "\" startinsert! endfunction nnoremap :nohlsearch nnoremap if !g:env.neo nnoremap :cnext nnoremap :cprevious endif nnoremap Y y$ nnoremap b :ls:b nnoremap M m nnoremap Q q nnoremap K nnoremap ZZ nnoremap ZQ nnoremap let s:toggle_commands = [] function! AddToggleCommand(command) call add(s:toggle_commands, a:command) endfunction function! s:toggle_options() for s:command in s:toggle_commands execute s:command endfor endfunction " ここでは,? を set したくないので ToggleOpt は使わない call AddToggleCommand('setlocal list!') call AddToggleCommand('setlocal foldenable!') command! MyToggle call s:toggle_options() nnoremap :MyToggle