Skip to content

Instantly share code, notes, and snippets.

@letmein
Created September 5, 2013 13:24
Show Gist options
  • Save letmein/6450045 to your computer and use it in GitHub Desktop.
Save letmein/6450045 to your computer and use it in GitHub Desktop.
virmrc
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
"if has("gui_running")
" GUI is running or is about to start.
" Maximize gvim window.
" set lines=61 columns=999
"else
" This is console Vim.
" if exists("+lines")
" set lines=50
" endif
" if exists("+columns")
" set columns=100
" endif
"endif
set t_Co=256
" colorscheme ir_black
colorscheme softblue
hi CursorLineNr guifg=#6d6d6d
hi CursorLine guibg=#002244
set cursorline
" set cursorcolumn
if has("autocmd")
filetype indent on
endif
set smartindent
set autoindent
set tabstop=2
set expandtab
set list
set listchars=tab:>.
set sw=2
" set cinkeys=0{,0},:,0#,!,!^F
" set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove right-hand scroll bar
set nu
set nowrap
" set noai
set hls!
" -------------------------------------------------------------------------
" Abbreviations
" -------------------------------------------------------------------------
nmap <C-s> :w<cr>
nmap <C-F4> :bd<cr>
nmap lc <S-V>yp
nnoremap <silent> <C-t> :NERDTreeToggle<CR>
" nnoremap <F12> :if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>
" , #perl # comments
map ,# :s/^/#/<CR>
nmap <F3> \be
let Tlist_Show_One_File = 1
let Tlist_Use_Right_Window0= 1
" let Tlist_Auto_Open = 1
" let Tlist_Exit_OnlyWindow = 1
let Tlist_Sort_Type = "name"
set sessionoptions=blank,buffers,curdir,folds,help,resize,tabpages,winsize
map <F5> :mksession! ~/.vim/.session <cr>
map <F9> :source ~/.vim/.session <cr>
set encoding=utf-8
set fileencoding=utf-8
au BufWritePost *.coffee silent CoffeeMake! -b | cwindow
au BufRead,BufNewFile *.rabl setf ruby
" add jbuilder syntax highlighting
au BufNewFile,BufRead *.json.jbuilder set ft=ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment