Improve some keymaps, instead of overriding standard keys.
Added many convenience mappings for LustyJuggler such as ,lm for rails models, ,lc for controllers, etc
This commit is contained in:
5
vim/plugin/settings/NERDtree-tabs.vim
Normal file
5
vim/plugin/settings/NERDtree-tabs.vim
Normal file
@@ -0,0 +1,5 @@
|
||||
" Auto open nerd tree on startup
|
||||
let g:nerdtree_tabs_open_on_gui_startup = 1
|
||||
" Focus in the main content window
|
||||
let g:nerdtree_tabs_focus_on_files = 1
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
let NERDTreeMinimalUI = 1
|
||||
let NERDTreeDirArrows = 1
|
||||
let g:NERDTreeWinSize = 30
|
||||
|
||||
|
||||
@@ -12,3 +12,11 @@ call EasyMotion#InitOptions({
|
||||
\ , 'hl_group_target' : 'Question'
|
||||
\ , 'hl_group_shade' : 'EasyMotionShade'
|
||||
\ })
|
||||
|
||||
" Use EasyMotion by double tapping comma
|
||||
nmap <silent> ,, \\w
|
||||
" Use EasyMotion backwards by z,,
|
||||
nmap <silent> z,, \\b
|
||||
" Make EasyMotion more yellow, less red
|
||||
hi clear EasyMotionTarget
|
||||
hi! EasyMotionTarget guifg=yellow
|
||||
|
||||
@@ -2,8 +2,32 @@
|
||||
" ========================================
|
||||
" better triggers for buffer switching
|
||||
" B to use the a/s/d/f juggler, S to search the buffers
|
||||
nmap <silent> B \lj
|
||||
nmap <silent> S \lb
|
||||
nmap <silent> ,b \lj
|
||||
nmap <silent> ,s \lb
|
||||
|
||||
" Remap using comma for the leader
|
||||
" lusty file explorer
|
||||
nmap <silent> ,lf \lf
|
||||
|
||||
" lusty file explorer from current location
|
||||
nmap <silent> ,lr \lr
|
||||
|
||||
" lusty buffer juggler (alternative mapping)
|
||||
nmap <silent> ,lb \lb
|
||||
|
||||
" lusty buffer juggler (alternative mapping)
|
||||
nmap <silent> ,lj \lj
|
||||
|
||||
"idea from : http://www.charlietanksley.net/blog/blog/2011/10/18/vim-navigation-with-lustyexplorer-and-lustyjuggler/
|
||||
" open lusty file explorer from specific rails-friendly places
|
||||
map ,lm :LustyFilesystemExplorer app/models<CR>
|
||||
map ,lc :LustyFilesystemExplorer app/controllers<CR>
|
||||
map ,lv :LustyFilesystemExplorer app/views<CR>
|
||||
map ,lh :LustyFilesystemExplorer app/helpers<CR>
|
||||
map ,ll :LustyFilesystemExplorer lib<CR>
|
||||
map ,lp :LustyFilesystemExplorer public<CR>
|
||||
map ,ls :LustyFilesystemExplorer specs<CR>
|
||||
map ,lt :LustyFilesystemExplorer test<CR>
|
||||
|
||||
let g:LustyJugglerSuppressRubyWarning = 1
|
||||
let g:LustyJugglerAltTabMode = 1
|
||||
|
||||
@@ -3,7 +3,16 @@
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
let g:neocomplcache_enable_camel_case_completion = 1
|
||||
let g:neocomplcache_enable_underbar_completion = 1
|
||||
let g:neocomplcache_min_syntax_length = 5
|
||||
let g:neocomplcache_enable_smart_case = 1
|
||||
|
||||
" default # of completions is 100, that's crazy
|
||||
let g:neocomplcache_max_list = 5
|
||||
|
||||
" words less than 3 letters long aren't worth completing
|
||||
let g:neocomplcache_auto_completion_start_length = 3
|
||||
|
||||
" tab completion (from neocomplcache docs)
|
||||
imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
" Choose completions using Apple-Space
|
||||
inoremap <expr><D-Space> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
" alias yw to yank the entire word even if the
|
||||
" cursor is inside the word
|
||||
nnoremap yw yaw
|
||||
"make Y consistent with C and D
|
||||
nnoremap Y y$
|
||||
|
||||
" ========================================
|
||||
" RSI Prevention - keyboard remaps
|
||||
@@ -44,12 +46,12 @@ imap <D-/> <Esc>:TComment<CR>i
|
||||
nnoremap ,gg :GitGrep "
|
||||
nnoremap ,gcp :GitGrepCurrentPartial<CR>
|
||||
|
||||
" hit F to find the definition of the current class
|
||||
" hit ,f to find the definition of the current class
|
||||
" this uses ctags. the standard way to get this is Ctrl-]
|
||||
nnoremap <silent> F <C-]>
|
||||
nnoremap <silent> ,f <C-]>
|
||||
|
||||
"toggle between last two buffers with Z (normally ctrl-shift-6)
|
||||
nnoremap <silent> Z <C-^>
|
||||
nnoremap <silent> ,z <C-^>
|
||||
|
||||
"git grep the current word using K (mnemonic Kurrent)
|
||||
nnoremap <silent> K :GitGrep <cword><CR>
|
||||
@@ -74,8 +76,8 @@ nnoremap <silent> Q <C-w>c
|
||||
" Use \Q to kill the buffer entirely
|
||||
nnoremap <silent> <Leader>Q :bw<CR>
|
||||
|
||||
"open the taglist (method browser) using \t
|
||||
nnoremap <silent> <Leader>t :TlistToggle<CR>
|
||||
"open the taglist (method browser) using ,t
|
||||
nnoremap <silent> ,T :TlistToggle<CR>
|
||||
|
||||
" create <%= foo %> erb tags using Ctrl-k in edit mode
|
||||
imap <silent> <C-K> <%= %><Esc>3hi
|
||||
|
||||
@@ -8,3 +8,5 @@ hi! link rubyDefine rubyControl
|
||||
" the currently selected buffer.
|
||||
hi clear Question
|
||||
hi! Question guifg=yellow
|
||||
|
||||
hi! link TagListFileName Question
|
||||
|
||||
10
vim/plugin/settings/unimpaired.vim
Normal file
10
vim/plugin/settings/unimpaired.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" https://github.com/carlhuda/janus/blob/master/vimrc
|
||||
|
||||
" Unimpaired configuration
|
||||
" Bubble single lines
|
||||
nmap <C-Up> [e
|
||||
nmap <C-Down> ]e
|
||||
|
||||
" Bubble multiple lines
|
||||
vmap <C-Up> [egv
|
||||
vmap <C-Down> ]egv
|
||||
Reference in New Issue
Block a user