Last active
August 29, 2015 14:18
-
-
Save Ming-Tang/3825bc448335749a22ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" https://github.com/jeetsukumaran/vim-indentwise | |
" Vim indent-level based motion | |
Plugin 'jeetsukumaran/vim-indentwise' | |
augroup fsharp_commands | |
autocmd! | |
" Prev/next let/type/exception/module/namespace | |
autocmd FileType fsharp nnoremap [[ :call search('\(^\s*\)\@<=\(let\\|and\\|type\\|exception\\|module\\|namespace\)\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]] :call search('\(^\s*\)\@<=\(let\\|and\\|type\\|exception\\|module\\|namespace\)\>', "W")<CR> | |
autocmd FileType fsharp nnoremap [m :call search('\(^\s*\)\@<=module\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]m :call search('\(^\s*\)\@<=module\>', "W")<CR> | |
autocmd FileType fsharp nnoremap [n :call search('\(^\s*\)\@<=namespace\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]n :call search('\(^\s*\)\@<=namespace\>', "W")<CR> | |
autocmd FileType fsharp nnoremap [t :call search('\(^\s*\)\@<=\(type\\|and\\|exception\)\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]t :call search('\(^\s*\)\@<=\(type\\|and\\|exception\)\>', "W")<CR> | |
autocmd FileType fsharp nnoremap [l :call search('\(^\s*\)\@<=\(let\\|and\)\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]l :call search('\(^\s*\)\@<=\(let\\|and\)\>', "W")<CR> | |
" Prev/next block | |
autocmd FileType fsharp nnoremap [b :call search('\(^\s*\)\@<=\(if\\|else\\|elif\\|for\\|while\\|match\)\>', "bW")<CR> | |
autocmd FileType fsharp nnoremap ]b :call search('\(^\s*\)\@<=\(if\\|else\\|elif\\|for\\|while\\|match\)\>', "W")<CR> | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment