Last active
May 10, 2017 00:07
-
-
Save bmmalone/e7cb77d6c39022ac25598467c3d4a349 to your computer and use it in GitHub Desktop.
Example vim config file
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
syntax on | |
set autoindent | |
set number | |
" try to handle tabs in makefiles correctly | |
filetype plugin on | |
" change to the directory of the current file by default | |
" workaround. see: https://github.com/vim/vim/issues/704 | |
autocmd VimEnter * set autochdir | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set undodir=~/.vim/.undo// | |
set backupdir=~/.vim/.backup// | |
set directory=~/.vim/.swp// | |
" cut/copy/paste to the system clipboard | |
set clipboard=unnamed | |
vmap <C-x> "+c<ESC>i | |
vmap <C-c> "+yi | |
vmap <C-v> c<ESC>"+p<Right> | |
imap <C-v> <Esc>"+pi<Right> | |
" Tab and Shift-Tab to (un)indent | |
vmap <Tab> >><Esc><Esc> | |
vmap <S-Tab> <<<Esc><Esc> | |
imap <S-Tab> <Esc><c-g>1<<i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment