Last active
October 27, 2016 17:31
-
-
Save josephbuchma/650d0dd87b553ca2c8a0 to your computer and use it in GitHub Desktop.
My .vimrc.before and .vimrc.after for dotvim (https://github.com/astrails/dotvim)
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
" configure colors & colorscheme | |
if &term =~ '256color' | |
" disable Background Color Erase (BCE) so that color schemes | |
" render properly when inside 256-color tmux and GNU screen. | |
" see also http://snk.tuxfamily.org/log/vim-256color-bce.html | |
set t_ut= | |
endif | |
:function SetDarkBg() | |
: let g:indent_guides_auto_colors = 0 | |
: autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=0 | |
: autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=0 | |
: set background=dark | |
:endfunction | |
:command Dark call SetDarkBg() | |
:function SetLightBg() | |
: let g:indent_guides_auto_colors = 0 | |
: autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=7 | |
: autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=7 | |
: set background=light | |
: source ~/.vimrc | |
:endfunction | |
:command Light call SetLightBg() | |
colorscheme solarized | |
source ~/.vimbackground | |
" enable autoreload file on change outside | |
set autoread | |
" do not respond to mouse clicks | |
set mouse= | |
filetype plugin on | |
set listchars=tab:⋅⋅,trail:· | |
map tg gT | |
" Screen settings | |
let g:ScreenImpl = 'Tmux' | |
let g:ScreenShellTmuxInitArgs = '-2' | |
let g:ScreenShellInitialFocus = 'shell' | |
let g:ScreenShellQuitOnVimExit = 0 | |
map <F5> :ScreenShellVertical<CR> | |
command! -nargs=? -complete=shellcmd W :w | :call ScreenShellSend("load '".@%."';") | |
map <Leader>it :call ScreenShellSend("RSpecConsole.run '".@% . ':' . line('.') . "'")<CR> | |
" map <Leader>sc :call ScreenShellSend("CucumberConsole.run '--format=pretty', '".@% . ':' . line('.') . "'")<CR> |
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
" map 'jj' to exit from insert mode | |
imap fd <Esc> | |
" remap ctrl-z to nothing. | |
map <C-z> <Nop> | |
" Space is your leader | |
let mapleader = "\<Space>" | |
" Default mapping | |
let g:multi_cursor_use_default_mapping=0 | |
let g:multi_cursor_start_key='<Leader>nn' | |
let g:multi_cursor_next_key='<C-n>' | |
let g:multi_cursor_prev_key='<C-p>' | |
let g:multi_cursor_skip_key='<C-x>' | |
let g:multi_cursor_quit_key='<Esc>' | |
" Emmet | |
let g:user_emmet_expandbar_key='<C-y>' | |
"let g:user_emmet_install_global=0 | |
"autocmd FileType html,erb,css,sassescss,less,js,coffee EmmetInstall | |
" search | |
nnoremap <leader>ag :Ag<Space> | |
"Syntastic rubocop | |
" let g:syntastic_ruby_checkers=['rubocop', 'mri'] | |
"Syntastic Go | |
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck'] | |
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } | |
"Vim-Go | |
let g:go_fmt_command = "goimports" | |
" Copy-paste | |
vmap <C-c> "+yi | |
vmap <C-x> "+c | |
vmap <C-v> c<ESC>"+p | |
imap <C-v> <C-r><C-o>+ | |
set guioptions-=m | |
set guioptions-=t | |
set guioptions-=T | |
set guioptions-=r | |
set guioptions-=L | |
if has('gui_running') | |
set guifont=Monospace\ 12 | |
endif | |
" set coordinates for sunset | |
let g:sunset_latitude = 49.8326046 | |
let g:sunset_longitude = 23.8721529 | |
let g:syntastic_auto_loc_list = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment