Skip to content

Instantly share code, notes, and snippets.

@codeprimate
Created June 29, 2011 17:50
Show Gist options
  • Save codeprimate/1054416 to your computer and use it in GitHub Desktop.
Save codeprimate/1054416 to your computer and use it in GitHub Desktop.
My VIM configuration
set nocompatible
set laststatus=2
set bs=2
set cursorline
set ignorecase
set showmatch
set mat=5
set nu
set ruler
set autoindent
set cindent
set shiftwidth=2
"set expandtab
set smartcase
set smarttab
set tabstop=2
"set wildchar=<Tab> wildmenu wildmode=full
set wildmenu
"set wildmode=longest:full
syntax on
filetype on
filetype plugin on
filetype indent on
colorscheme evening
highlight Pmenu ctermbg=238 gui=bold
"set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
"autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
"autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
"autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
"autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
map <C-T> :tabnew<CR>
map <a-s-right> :tabnext<CR>
map <a-s-left> :tabprev<CR>
map <C-V> "+gP
cmap <C-V> <C-R>+
vnoremap <C-C> "+y
imap <S-CR> <CR><CR>end<Esc>-cc
" To create new file securely do: vim new.file.txt.gpg
" Your private key used to decrypt the text before viewing should
" be protected by a passphrase. Alternatively one could use
" a passphrase directly with symmetric encryption in the gpg commands below.
au BufNewFile,BufReadPre *.gpg :set secure viminfo= noswapfile nobackup nowritebackup history=0 binary
au BufReadPost *.gpg :%!gpg -d 2>/dev/null
au BufWritePre *.gpg :%!gpg -e -r '[email protected]' 2>/dev/null
au BufWritePost *.gpg u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment