Skip to content

Instantly share code, notes, and snippets.

@nosami
Created August 28, 2013 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nosami/6372162 to your computer and use it in GitHub Desktop.
Save nosami/6372162 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set encoding=utf-8
call pathogen#infect()
" colorscheme vividchalk
"colorscheme solarized
colorscheme molokai
if has("gui_running")
let g:molokai_original = 1
" GUI is running or is about to start
set rtp+=$VIM\vim73\bundle\vundle
" call vundle#rc()
" Bundle 'gmarik/vundle'
set dictionary=C:\cygwin\usr\share\dict\words
"set thesaurus=C:\cygwin\usr\share\dict\mthesaur.txt
set thesaurus=C:\cygwin\usr\share\dict\roget13a.txt
set guifont=Consolas:h10.15:cANSI
" Remove menu bar
set guioptions-=m
" Remove toolbar
set guioptions-=T
" Remove scrollbars
set guioptions+=LlRrb
set guioptions-=LlRrb
set noswapfile
set makeprg=c:\build.bat
let Tlist_Ctags_Cmd = 'c:\cygwin\bin\ctags.exe'
else
let $TMPDIR = $HOME."/tmp"
let g:molokai_original = 0
" This is console Vim.
" colorscheme tir_black_my
if exists("+lines")
" set lines=50
endif
if exists("+columns")
" set columns=100
endif
set dictionary=/usr/share/dict/words
set thesaurus=/usr/share/dict/mthesaur.txt
set thesaurus+=/usr/share/dict/roget13a.txt
"set makeprg=/cygdrive/c/build.sh
set t_Co=256
endif
let g:UltiSnipsExpandTrigger="<c-j>"
filetype plugin on
filetype indent on
syntax on
set hidden " When a new file is opened, the previous one isn't abandoned, so no save prompt
set confirm " Demands confirmation before closing unsaved buffers
set directory=.,$TEMP "stops unable to open swap file'
set number
set cursorline
set mouse=a
set autoindent
set splitbelow
set si
set history=1000
set noexpandtab " tabs are tabs, not spaces
set shiftwidth=4
set tabstop=4
set modeline
set ignorecase
set incsearch
"set hlsearch
"set showmatch
set backspace=indent,eol,start " backspace for dummys
set scrolljump=5 " lines to scroll when cursor leaves screen
"set scrolloff=3 " minimum lines to keep above and below
set wildmode=longest,list,full
set wildmenu
set showmode
set virtualedit=all
set nowrap
" Set the status line the way I like it
set stl=%f\ %m\ %r\ Line:\ %l/%L[%p%%]\ Col:\ %c\ Buf:\ #%n\ [%b][0x%B]
set tags=./tags;/.
" tell Vim to always put a status line in, even if there is only one
" window
set laststatus=2
" Syntax coloring lines that are too long just slows down the world
set synmaxcol=2048
"hi cursorline ctermbg=darkgray cterm=none
au BufNewFile,BufRead *.spark set filetype=xml
au BufNewFile,BufRead *.cshtml set filetype=html
" Enable omni completion.
"highlight Pmenu guibg=#333333
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType razor,spark,html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
"autocmd FileType omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
set wildignore+=tmp\*,*.swp,*.zip,*.exe,*.dll,*.pdb " ignore these filetypes (for ctrlp)
set gdefault " the /g flag on :s substitutions by default "inoremap <C-Space> <C-x><C-o>
set errorformat=\ %#%f(%l\\\,%c):\ %m
" disable beeping
set noerrorbells visualbell t_vb=
autocmd VimEnter * set vb t_vb=
autocmd GUIEnter * set visualbell t_vb=
""set cinoptions+=j1
""Make window smaller
""map - <C-W>-
"Make window bigger
"map = <C-W>+
map <F5> :wa!<cr>:OmniSharpBuildAsync<cr>
map B :wa!<cr>:OmniSharpBuildAsync<cr>
map <F7> :NERDTreeToggle<cr>
map <F8> :TlistToggle<cr>
"Switch window
map <F6> <C-W>w
nnoremap <F5> :wa!<cr>:OmniSharpBuild<cr>
" Builds can run asynchronously with vim-dispatch installed
"nnoremap <F5> :wa!<cr>:OmniSharpBuildAsync<cr>
let g:OmniSharp_typeLookupInPreview = 1
nnoremap <F12> :OmniSharpGotoDefinition<cr>
nnoremap gd :OmniSharpGotoDefinition<cr>
nnoremap <leader>fi :OmniSharpFindImplementations<cr>
nnoremap <leader>fu :OmniSharpFindUsages<cr>
nnoremap <leader>tt :OmniSharpTypeLookup<cr>
nnoremap tt :OmniSharpFindType<cr>
nnoremap mm :OmniSharpFindSymbol<cr>
"I find contextual code actions so useful that I have it mapped to the spacebar
nnoremap <space> :OmniSharpGetCodeActions<cr>
" rename with dialog
nnoremap nm :OmniSharpRename<cr>
nnoremap <F2> :OmniSharpRename<cr>
" rename without dialog - with cursor on the symbol to rename... ':Rename newname'
command! -nargs=1 Rename :call OmniSharp#RenameTo("<args>")
" Force OmniSharp to reload the solution. Useful when switching branches etc.
nnoremap <leader>rl :OmniSharpReloadSolution<cr>
nnoremap <leader>fm :OmniSharpFindMembers<cr>
nnoremap <leader>cf :OmniSharpCodeFormat<cr>
nnoremap <leader>tp :OmniSharpAddToProject<cr>
" (Experimental - uses vim-dispatch or vimproc plugin) - Start the omnisharp server for the current solution
nnoremap <leader>ss :OmniSharpStartServer<cr>
nnoremap <leader>sp :OmniSharpStopServer<cr>
nnoremap <leader>th :OmniSharpHighlightTypes<cr>
let g:OmniSharp_Dispatch_Background=1
nmap <S-A-L> :NERDTreeFind<cr>
map <C-F> :FufTag<cr>
noremap <C-C> :qa!<cr>
"nmap <space> H<leader><leader>f
nmap <A-Left> :bp<cr>
nmap <A-Right> :bn<cr>
nmap <C-S> :w!<cr>
"nmap <cr> _i<cr><esc>
nmap <silent> <leader>ev :e $MYVIMRC<cr>
nmap <silent> <leader>sv :so $MYVIMRC<cr>
"nnoremap <Space> i<Space><Esc>
" " supertab + eclim == java win
"CTRL-P settings
set wildignore+=tmp\*,*.swp,*.zip,*.exe,*.dll " Windows
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
let g:ConqueTerm_FastMode = 1
set completeopt+=longest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment