Created
February 26, 2016 22:01
-
-
Save cmosguy/8802f96427ca9d08e51a to your computer and use it in GitHub Desktop.
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
"let &runtimepath.=',$HOME/.vim' | |
set nocompatible "we want latest vim settings and options | |
so ~/.vim/plugins.vim | |
"-------------General Settings--------------" | |
set directory+=$HOME | |
set directory+=$TEMP | |
set nowrap | |
syntax enable | |
"colorscheme desert | |
colorscheme atom-dark | |
set backspace=indent,eol,start "Make backspace behave like every other editor. | |
let mapleader = ',' "The default leader is \, but a comma is much better. | |
set number "Let's activate line numbers. | |
set autochdir "Set current working directory to automatically be where the current file is located | |
"-------------Visuals--------------" | |
set t_CO=256 "Use 256 colors. This is useful for Terminal Vim. | |
"set guifont=consolas:h12 "Set the default font family and size. | |
set guifont=Monospace\ 12 | |
set linespace=15 "Macvim-specific line-height. | |
set guioptions-=l "Disable Gui scrollbars. | |
set guioptions-=L | |
set guioptions-=r | |
set guioptions-=R | |
"make side line number background more pretty | |
hi LineNr guibg=bg | |
"get rid of ugly split borders | |
hi vertsplit guifg=bg guibg=bg | |
"set tab spacing to 4 and for auto indenting | |
set tabstop=4 | |
set shiftwidth=4 | |
"-------------Search--------------" | |
set hlsearch | |
set incsearch | |
"-------------Split Management--------------" | |
set splitbelow "Make splits default to below... | |
set splitright "And to the right. This feels more natural. | |
"We'll set simpler mappings to switch between splits. | |
nmap <C-J> <C-W><C-J> | |
nmap <C-K> <C-W><C-K> | |
nmap <C-H> <C-W><C-H> | |
nmap <C-L> <C-W><C-L> | |
"-------------Mappings--------------" | |
"Make it easy to edit the Vimrc file. | |
nmap <Leader>ev :edit ~/.vimrc<cr> | |
"Add simple highlight removal. | |
nmap <Leader><space> :nohlsearch<cr> | |
"Make NERDTree easier to toggle | |
nmap <A-1> :NERDTreeToggle<cr> | |
" CTRL-P plugin | |
nmap <c-R> :CtrlPBufTag<cr> | |
nmap <space><space> :CtrlPMRUFiles<cr> | |
" auto indent parts of the file | |
map <c-F> mzgg=G`z | |
"NERD commenter | |
"nmap <c-B> NERDComToggleComment | |
"-------------Plugins--------------" | |
"/ | |
"/ CtrlP | |
"/ | |
let g:ctrlp_custom_ignore = 'node_modules\DS_Store\|git' | |
let g:ctrlp_match_window = 'top,order:ttb,min:1,max:30,results:30' | |
"let g:ctrlp_extensions = ['symbol'] | |
"let g:symbol_patterns['javascript'] = '\.prototype.\zs\w\+\ze\ = function' | |
"/ | |
"/ NERDTree | |
"/ | |
let NERDTreeHijackNetrw = 0 | |
"/ | |
"/ tcl.vim | |
"/ | |
let tcl_extended_syntax=1 | |
" | |
" perforce.vim | |
" | |
if getline(1) =~ '^# A Perforce ' | |
setfiletype perforce | |
endif | |
"-------------Auto-Commands--------------" | |
"Automatically source the Vimrc file on save. | |
augroup autosourcing | |
autocmd! | |
autocmd BufWritePost .vimrc source % | |
augroup END | |
"------------- Notes --------------" | |
"switch between buffers :bn (next buffer) | |
"zz - center screen to cursor line | |
"C-W f - open file under cursor in split window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment