Created
September 24, 2013 22:57
-
-
Save adnichols/6692478 to your computer and use it in GitHub Desktop.
vimrc.after as it stands today
This file contains hidden or 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
set nocursorline " don't highlight current line | |
set background=dark | |
set nocompatible | |
let mapleader="," | |
set clipboard=unnamed | |
" keyboard shortcuts | |
set autowrite | |
set autoread | |
set directory-=. | |
set nowritebackup | |
set softtabstop=2 | |
set tabstop=8 " Actual tabstops are 8 chars, if they exist I want to fix them | |
set whichwrap+=<,>,h,l,[,] " Wrap arrow keys between lines | |
autocmd! bufwritepost .vimrc source ~/.vimrc | |
set colorcolumn=80 | |
map <Leader>n :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
" gui settings | |
if (&t_Co == 256 || has('gui_running')) | |
if ($TERM_PROGRAM == 'iTerm.app') | |
colorscheme solarized | |
else | |
endif | |
colorscheme desert | |
endif | |
let g:nerdtree_tabs_open_on_console_startup = 1 | |
let g:headlights_use_plugin_menu = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#csv#enabled = 0 | |
let g:ctrlp_prompt_mappings = { | |
\ 'AcceptSelection("e")': [], | |
\ 'AcceptSelection("t")': ['<cr>', '<c-m>'], | |
\ } | |
nmap <leader><space> :call whitespace#strip_trailing()<CR> | |
map <leader>l :Align | |
nmap <leader>a :Ack<space> | |
" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher | |
if executable('ag') | |
let g:ackprg = 'ag --nogroup --column' | |
" Use Ag over Grep | |
set grepprg=ag\ --nogroup\ --nocolor | |
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
endif | |
" Enable basic mouse behavior such as resizing buffers. | |
set mouse=a | |
if exists('$TMUX') " Support resizing in tmux | |
set ttymouse=xterm2 | |
endif | |
" Fix Cursor in TMUX | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif | |
map <C-w> :tabclose<CR> | |
map <C-t> :tabnew<CR> | |
" inside screen / tmux | |
map <Esc>[C <C-Right> | |
map <Esc>[D <C-Left> | |
" insert mode | |
map! <Esc>[C <C-Right> | |
map! <Esc>[D <C-Left> | |
" no screen | |
map <Esc>[1;5D <C-Left> | |
map <Esc>[1;5C <C-Right> | |
" insert mode | |
map! <Esc>[1;5D <C-Left> | |
map! <Esc>[1;5C <C-Right> | |
nnoremap <C-right> :tabnext<CR> | |
nnoremap } :tabnext<CR> | |
nnoremap <C-left> :tabprevious<CR> | |
nnoremap { :tabprevious<CR> | |
" insert mode | |
inoremap <C-right> <Esc>:tabnext<CR> | |
inoremap <C-left> <Esc>:tabprevious<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment