Skip to content

Instantly share code, notes, and snippets.

@kodo-pp
Last active March 1, 2019 18:21
Show Gist options
  • Save kodo-pp/b4f3083ec10295d3531d279cfe267329 to your computer and use it in GitHub Desktop.
Save kodo-pp/b4f3083ec10295d3531d279cfe267329 to your computer and use it in GitHub Desktop.
My .vimrc
inoremap <C-W> <Esc>:w<CR>a
inoremap <F7> <Esc>:w<CR>a
nmap <F2> :!
imap <F2> <Esc>:!
imap <C-F><F9> <F2>CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR>
nmap <C-F><F9> <F2>CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR>
imap <C-F><F10> <F2>FORCE_REBUILD=yes CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR>
nmap <C-F><F10> <F2>FORCE_REBUILD=yes CC_TOOLCHAIN=clang DEBUG=yes ./run.sh -f<CR>
set number
syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
autocmd FileType make setlocal noexpandtab
set tags+=~/.vim/tags/cpp
set tags+=~/.vim/tags/irrlicht
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave *.cpp,*.c if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest
set smartindent
autocmd BufNewFile,BufRead,BufEnter *.asm set syntax=nasm
map <F6> <plug>NERDCommenterComment
set updatetime=250
autocmd BufNewFile,BufRead,BufEnter *.cpp,*.c set omnifunc=ClangComplete
autocmd BufNewFile,BufRead,BufEnter *.cpp,*.c set completefunc=ClangComplete
autocmd BufNewFile,BufRead,BufEnter * set omnifunc=syntaxcomplete#Complete
autocmd BufNewFile,BufRead,BufEnter * set completefunc=syntaxcomplete#Complete
if $SOLARIZED == 'yes'
set background=dark
let g:solarized_termtrans=1
colorscheme solarized
endif
set encoding=utf-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment