Created
March 5, 2013 19:33
-
-
Save Pacifist117/5093441 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
" Color | |
" ============== | |
set t_Co=256 | |
colorscheme darkburn | |
" Highlevel modes | |
"=============== | |
filetype plugin indent on | |
filetype on | |
set nocompatible " Disallow vi compatibility mode. | |
" Syntax | |
"=============== | |
syntax enable | |
"Enable syntax highlighting | |
if has("syntax") | |
syntax on | |
if version >= 700 | |
set cursorline " highlight/underline line the cursor is on | |
endif | |
endif | |
set ofu=syntaxcomplete#Complete | |
" Latex | |
"=============== | |
let g:tex_flavor='latex' | |
set grepprg=grep\ -nH\ $* | |
"let g:Tex_Folding=0 "I don't like folding. | |
set iskeyword+=: | |
" Cursor | |
"=============== | |
"Turn cursorline off for .tex files, because for some reason it horrendously | |
"slows vim down | |
autocmd FileType tex set nocursorline | |
"autocmd FileType tex :SPCheck | |
set so=8 " Scroll 8 lines ahead of cursor. | |
" Searching | |
"=============== | |
"Make all-lowercase searches case-insensitive, otherwise do normal searches | |
set ignorecase | |
set smartcase | |
set incsearch "auto start searching | |
set hlsearch "hilight found search patterns | |
"press space to turn off highlighting and clear any message already displayed | |
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR> | |
set showmatch " Jump to matching brackets. | |
" Spacing | |
"============== | |
set shiftwidth=4 "shifts (>>) are 4 spaces | |
set tabstop=4 "tab = 4 spaces | |
set expandtab | |
"set cindent "cstyle indents | |
set number "line numbers | |
set wrap "wraps text | |
set textwidth=0 wrapmargin=0 | |
" Mouse stuff | |
"============== | |
set mousem=popup "right click menu | |
set mousehide | |
" Tabs | |
"============== | |
set tabpagemax=15 | |
" Tags | |
"============== | |
let Tlist_Ctags_Cmd = "/usr/bin/ctags" | |
let Tlist_WinWidth = 50 | |
" AutoCompletion | |
"============== | |
set completeopt=menu,menuone,longest " Complete options (disable preview scratch window) | |
set pumheight=15 " Limit popup menu height | |
let g:SuperTabDefaultCompletionType = "context" " SuperTab option for context aware completion | |
let g:clang_complete_auto = 0 " Disable auto popup, use <Tab> to autocomplete | |
let g:clang_complete_copen = 1 " Show clang errors in the quickfix window | |
"configure tags - add additional tags here or comment out not-used ones | |
set tags+=~/.vim/tags/cpp | |
set tags+=~/.vim/tags/gl | |
set tags+=~/.vim/tags/sdl | |
set tags+=~/.vim/tags/qt4 | |
" build tags of your own project with Ctrl-F12 | |
map <C-F12> :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR> | |
" Filenames | |
"============== | |
set wildmode=longest,list | |
set wildmenu | |
" Suffixes that get lower priority when doing tab completion for filenames. | |
" These are files we are not likely to want to edit or read. | |
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc | |
" Other | |
"============== | |
set autowrite "autosave on compile | |
set scrolloff=2 | |
set backspace=indent,eol,start | |
" Keymappings | |
"============= | |
map <F2> :setlocal spell!<cr> | |
map <F3> :NERDTreeToggle<cr> | |
map <F4> :TlistToggle<cr> | |
"Aliases | |
"============== | |
ab #b /********************************************************** | |
ab #e **********************************************************/ | |
ab #l *--------------------------------------------------------*/ | |
"aliases for oft-mistyped commands | |
ca WQ wq | |
ca Wq wq | |
ca W w | |
ca Q q | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment