Done smaller changes to basic.vim and plugins_config.vim
This commit is contained in:
parent
eddb45f546
commit
20c294daba
2 changed files with 18 additions and 8 deletions
|
@ -73,6 +73,11 @@ set wildmenu
|
||||||
|
|
||||||
" Ignore compiled files
|
" Ignore compiled files
|
||||||
set wildignore=*.o,*~,*.pyc
|
set wildignore=*.o,*~,*.pyc
|
||||||
|
if has("win16") || has("win32")
|
||||||
|
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
|
||||||
|
else
|
||||||
|
set wildignore+=.git\*,.hg\*,.svn\*
|
||||||
|
endif
|
||||||
|
|
||||||
"Always show current position
|
"Always show current position
|
||||||
set ruler
|
set ruler
|
||||||
|
@ -181,8 +186,8 @@ set wrap "Wrap lines
|
||||||
""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""
|
||||||
" Visual mode pressing * or # searches for the current selection
|
" Visual mode pressing * or # searches for the current selection
|
||||||
" Super useful! From an idea by Michael Naumann
|
" Super useful! From an idea by Michael Naumann
|
||||||
vnoremap <silent> * :call VisualSelection('f')<CR>
|
vnoremap <silent> * :call VisualSelection('f', '')<CR>
|
||||||
vnoremap <silent> # :call VisualSelection('b')<CR>
|
vnoremap <silent> # :call VisualSelection('b', '')<CR>
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
@ -284,7 +289,7 @@ autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||||
" => vimgrep searching and cope displaying
|
" => vimgrep searching and cope displaying
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" When you press gv you vimgrep after the selected text
|
" When you press gv you vimgrep after the selected text
|
||||||
vnoremap <silent> gv :call VisualSelection('gv')<CR>
|
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
|
||||||
|
|
||||||
" Open vimgrep and put the cursor in the right position
|
" Open vimgrep and put the cursor in the right position
|
||||||
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||||
|
@ -293,7 +298,7 @@ map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||||
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||||
|
|
||||||
" When you press <leader>r you can search and replace the selected text
|
" When you press <leader>r you can search and replace the selected text
|
||||||
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR>
|
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
||||||
|
|
||||||
" Do :help cope if you are unsure what cope is. It's super useful!
|
" Do :help cope if you are unsure what cope is. It's super useful!
|
||||||
"
|
"
|
||||||
|
@ -348,7 +353,7 @@ function! CmdLine(str)
|
||||||
unmenu Foo
|
unmenu Foo
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! VisualSelection(direction) range
|
function! VisualSelection(direction, extra_filter) range
|
||||||
let l:saved_reg = @"
|
let l:saved_reg = @"
|
||||||
execute "normal! vgvy"
|
execute "normal! vgvy"
|
||||||
|
|
||||||
|
@ -358,7 +363,7 @@ function! VisualSelection(direction) range
|
||||||
if a:direction == 'b'
|
if a:direction == 'b'
|
||||||
execute "normal ?" . l:pattern . "^M"
|
execute "normal ?" . l:pattern . "^M"
|
||||||
elseif a:direction == 'gv'
|
elseif a:direction == 'gv'
|
||||||
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
|
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
|
||||||
elseif a:direction == 'replace'
|
elseif a:direction == 'replace'
|
||||||
call CmdLine("%s" . '/'. l:pattern . '/')
|
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||||
elseif a:direction == 'f'
|
elseif a:direction == 'f'
|
||||||
|
|
|
@ -45,7 +45,12 @@ endif
|
||||||
" => CTRL-P
|
" => CTRL-P
|
||||||
""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""
|
||||||
let g:ctrlp_working_path_mode = 0
|
let g:ctrlp_working_path_mode = 0
|
||||||
|
|
||||||
let g:ctrlp_map = '<c-f>'
|
let g:ctrlp_map = '<c-f>'
|
||||||
|
map <c-b> :CtrlPBuffer<cr>
|
||||||
|
|
||||||
|
let g:ctrlp_max_height = 20
|
||||||
|
let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee'
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""
|
||||||
|
@ -80,5 +85,5 @@ map <leader>nf :NERDTreeFind<cr>
|
||||||
" => surround.vim config
|
" => surround.vim config
|
||||||
" Annotate strings with gettext http://amix.dk/blog/post/19678
|
" Annotate strings with gettext http://amix.dk/blog/post/19678
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
au FileType mako vmap <buffer> Si S"i${ _(<esc>2f"a) }<esc>
|
vmap Si S(i_<esc>f)
|
||||||
vmap Si S)i_<esc>f)
|
au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
|
||||||
|
|
Loading…
Reference in a new issue