mirror of
https://github.com/amix/vimrc
synced 2025-07-06 16:05:01 +08:00
Merging upstream, wiping syntastic.
This commit is contained in:
@ -293,23 +293,21 @@ autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => vimgrep searching and cope displaying
|
||||
" => Ack searching and cope displaying
|
||||
" requires ack.vim - it's much better than vimgrep/grep
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" When you press gv you vimgrep after the selected text
|
||||
" When you press gv you Ack after the selected text
|
||||
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
|
||||
|
||||
" Open vimgrep and put the cursor in the right position
|
||||
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||
|
||||
" Vimgreps in the current file
|
||||
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||
" Open Ack and put the cursor in the right position
|
||||
map <leader>g :Ack
|
||||
|
||||
" When you press <leader>r you can search and replace the selected text
|
||||
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
|
||||
|
||||
" Do :help cope if you are unsure what cope is. It's super useful!
|
||||
"
|
||||
" When you search with vimgrep, display your results in cope by doing:
|
||||
" When you search with Ack, display your results in cope by doing:
|
||||
" <leader>cc
|
||||
"
|
||||
" To go to the next search result do:
|
||||
@ -343,9 +341,12 @@ map <leader>s? z=
|
||||
" Remove the Windows ^M - when the encodings gets messed up
|
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||
|
||||
" Quickly open a buffer for scripbble
|
||||
" Quickly open a buffer for scribble
|
||||
map <leader>q :e ~/buffer<cr>
|
||||
|
||||
" Quickly open a markdown buffer for scribble
|
||||
map <leader>x :e ~/buffer.md<cr>
|
||||
|
||||
" Toggle paste mode on and off
|
||||
map <leader>pp :setlocal paste!<cr>
|
||||
|
||||
@ -370,7 +371,7 @@ function! VisualSelection(direction, extra_filter) range
|
||||
if a:direction == 'b'
|
||||
execute "normal ?" . l:pattern . "^M"
|
||||
elseif a:direction == 'gv'
|
||||
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
|
||||
call CmdLine("Ack \"" . l:pattern . "\" " )
|
||||
elseif a:direction == 'replace'
|
||||
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||
elseif a:direction == 'f'
|
||||
|
@ -8,15 +8,13 @@
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => GUI related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
set background=dark
|
||||
|
||||
colorscheme peaksea
|
||||
|
||||
" Set font according to system
|
||||
if has("mac") || has("macunix")
|
||||
set gfn=Menlo:h15
|
||||
set gfn=Source\ Code\ Pro:h15,Menlo:h15
|
||||
elseif has("win16") || has("win32")
|
||||
set gfn=Bitstream\ Vera\ Sans\ Mono:h11
|
||||
set gfn=Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11
|
||||
elseif has("linux")
|
||||
set gfn=Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11
|
||||
elseif has("unix")
|
||||
set gfn=Monospace\ 11
|
||||
endif
|
||||
@ -33,6 +31,15 @@ set guioptions-=R
|
||||
set guioptions-=l
|
||||
set guioptions-=L
|
||||
|
||||
" Colorscheme
|
||||
if has("gui_running")
|
||||
set background=dark
|
||||
colorscheme peaksea
|
||||
else
|
||||
colorscheme desert
|
||||
let g:colors_name="desert"
|
||||
endif
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Fast editing and reloading of vimrc configs
|
||||
|
@ -26,7 +26,7 @@ au FileType javascript call JavaScriptFold()
|
||||
au FileType javascript setl fen
|
||||
au FileType javascript setl nocindent
|
||||
|
||||
au FileType javascript imap <c-t> AJS.log();<esc>hi
|
||||
au FileType javascript imap <c-t> $log();<esc>hi
|
||||
au FileType javascript imap <c-a> alert();<esc>hi
|
||||
|
||||
au FileType javascript inoremap <buffer> $r return
|
||||
|
@ -8,8 +8,8 @@
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Load pathogen paths
|
||||
""""""""""""""""""""""""""""""
|
||||
call pathogen#infect('~/.vim_runtime/sources_forked')
|
||||
call pathogen#infect('~/.vim_runtime/sources_non_forked')
|
||||
call pathogen#infect('~/.vim_runtime/sources_forked/{}')
|
||||
call pathogen#infect('~/.vim_runtime/sources_non_forked/{}')
|
||||
call pathogen#helptags()
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
@ -45,19 +45,13 @@ endif
|
||||
let g:ctrlp_working_path_mode = 0
|
||||
|
||||
let g:ctrlp_map = '<c-f>'
|
||||
map <leader>j :CtrlP<cr>
|
||||
map <c-b> :CtrlPBuffer<cr>
|
||||
|
||||
let g:ctrlp_max_height = 20
|
||||
let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee'
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Peepopen
|
||||
""""""""""""""""""""""""""""""
|
||||
map <leader>j :PeepOpen<cr>
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => ZenCoding
|
||||
""""""""""""""""""""""""""""""
|
||||
@ -105,3 +99,17 @@ au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
|
||||
" => vim-airline config (force color)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:airline_theme="luna"
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Vimroom
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:goyo_width=100
|
||||
let g:goyo_margin_top = 2
|
||||
let g:goyo_margin_bottom = 2
|
||||
nnoremap <silent> <leader>z :Goyo<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Syntastic (syntax checker)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:syntastic_python_checkers=['pyflakes']
|
||||
|
Reference in New Issue
Block a user