Last active
December 11, 2015 11:38
-
-
Save dexterbt1/4595240 to your computer and use it in GitHub Desktop.
vim Config
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
" ============================================== | |
" Basics | |
set nocompatible " vi compatibility not a priority | |
set encoding=utf8 | |
set fileencoding=utf8 | |
set expandtab " foce convert tabs to spaces | |
set ts=4 " tabs are 4-space aparts | |
set sw=4 " shift widths as well | |
set nu " show line numbers | |
set nowrap " no wrapping | |
set cursorline " so we can easily see the cursor | |
set viewoptions=folds,options,cursor,unix,slash | |
set history=1000 " lots of :cmdline history | |
syntax on | |
" vim tabs navigation via Ctrl-[hjkl] | |
nmap <c-h> :tabprevious<Enter> | |
nmap <c-l> :tabnext<Enter> | |
nmap <c-j> 15j | |
nmap <c-k> 15k | |
set wmw=0 | |
" searching | |
set incsearch "find the next match as we type the search | |
set hlsearch "hilight searches by default | |
" statusline | |
set guioptions=imc | |
set statusline=%-3.3n\ %f%m%r%h%w\ [fmt=%{&ff}]\ [filetype=%Y]\ [ascii=\%03.3b]\ [hex=\%02.2B]\ [pos=%l,%v][%p%%]\ [len=%L] | |
set laststatus=2 | |
" tell the term has 256 colors | |
set t_Co=256 | |
" hide buffers when not displayed | |
set hidden | |
" cut/paste support Ctrl-Ins et al. | |
vnoremap <C-Insert> "+y | |
imap <S-Insert> <C-O>"+gP | |
cmap <S-Insert> <C-R>+ | |
" ============================================== | |
" Plugins | |
" Pathogen - for plugin management; https://github.com/tpope/vim-pathogen | |
execute pathogen#infect() | |
" NERDTree - for easier filesystem navigation (via F2); https://github.com/scrooloose/nerdtree | |
map <F2> :NERDTreeToggle<CR> | |
let g:NERDTreeDirArrows=0 | |
let NERDTreeIgnore = ['\.pyc$','\.sw[opqrst]$','\.class'] | |
" Solarize - my choice in colorschemes; https://github.com/altercation/vim-colors-solarized | |
if has('gui_running') | |
set background=light | |
else | |
set background=dark | |
endif | |
let g:solarized_termcolors = 256 | |
let g:solarized_visibility = "high" | |
let g:solarized_contrast = "high" | |
colorscheme solarized | |
set hlsearch | |
" to honor 80-char, we'll highlight chars beyond 80-char limit | |
highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
match OverLength /\%81v.\+/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment