Added a lot of changes to vimrc
This commit is contained in:
parent
15f009fe69
commit
78e7d1be92
4
.inputrc
4
.inputrc
@ -1,3 +1,7 @@
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Enable Vim keybindings
|
||||
set editing-mode vi
|
||||
set keymap vi-command
|
||||
|
146
.vimrc
146
.vimrc
@ -1,52 +1,89 @@
|
||||
set nocompatible " be iMproved
|
||||
filetype off " turn this off for a minute
|
||||
"NeoBundle Scripts-----------------------------
|
||||
if has('vim_starting')
|
||||
set nocompatible " Be iMproved
|
||||
filetype off " turn this off for a minute
|
||||
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
" Required:
|
||||
set runtimepath+=/home/tgrosinger/.vim/bundle/neobundle.vim/
|
||||
endif
|
||||
|
||||
" List of Vundle plugins
|
||||
Plugin 'gmarik/Vundle.vim'
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
Plugin 'altercation/vim-colors-solarized'
|
||||
Plugin 'tpope/vim-surround'
|
||||
Plugin 'tpope/vim-commentary'
|
||||
Plugin 'tpope/vim-repeat'
|
||||
Plugin 'tacahiroy/ctrlp-funky'
|
||||
Plugin 'terryma/vim-multiple-cursors'
|
||||
Plugin 'Lokaltog/powerline'
|
||||
Plugin 'Lokaltog/vim-easymotion'
|
||||
Plugin 'jistr/vim-nerdtree-tabs'
|
||||
Plugin 'mbbill/undotree'
|
||||
Plugin 'nathanaelkane/vim-indent-guides'
|
||||
Plugin 'osyo-manga/vim-over'
|
||||
Plugin 'reedes/vim-litecorrect'
|
||||
Plugin 'reedes/vim-wordy'
|
||||
Plugin 'scrooloose/syntastic'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plugin 'scrooloose/nerdcommenter'
|
||||
Plugin 'godlygeek/tabular'
|
||||
Plugin 'majutsushi/tagbar'
|
||||
Plugin 'Valloric/YouCompleteMe'
|
||||
Plugin 'sirver/ultisnips'
|
||||
Plugin 'myusuf3/numbers.vim'
|
||||
" Required:
|
||||
call neobundle#begin(expand('/home/tgrosinger/.vim/bundle'))
|
||||
|
||||
" Let NeoBundle manage NeoBundle
|
||||
" Required:
|
||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
||||
|
||||
" My Bundles here:
|
||||
NeoBundle 'gmarik/Vundle.vim'
|
||||
NeoBundle 'tpope/vim-surround'
|
||||
NeoBundle 'tpope/vim-commentary'
|
||||
NeoBundle 'tpope/vim-repeat'
|
||||
NeoBundle 'tacahiroy/ctrlp-funky'
|
||||
NeoBundle 'terryma/vim-multiple-cursors'
|
||||
NeoBundle 'Lokaltog/vim-easymotion'
|
||||
NeoBundle 'nathanaelkane/vim-indent-guides'
|
||||
NeoBundle 'osyo-manga/vim-over'
|
||||
NeoBundle 'reedes/vim-litecorrect'
|
||||
NeoBundle 'reedes/vim-wordy'
|
||||
NeoBundle 'scrooloose/syntastic'
|
||||
NeoBundle 'tpope/vim-fugitive'
|
||||
NeoBundle 'scrooloose/nerdcommenter'
|
||||
NeoBundle 'godlygeek/tabular'
|
||||
NeoBundle 'Valloric/YouCompleteMe'
|
||||
NeoBundle 'sirver/ultisnips'
|
||||
NeoBundle 'tpope/vim-fugitive'
|
||||
NeoBundle 'airblade/vim-gitgutter'
|
||||
|
||||
" Color Scheme
|
||||
NeoBundle 'altercation/vim-colors-solarized'
|
||||
|
||||
" Tagbar
|
||||
NeoBundle 'majutsushi/tagbar'
|
||||
nnoremap <F8> :TagbarToggle<cr> " Toggle the tagbar
|
||||
|
||||
" Nerdtree
|
||||
NeoBundle 'scrooloose/nerdtree'
|
||||
NeoBundle 'jistr/vim-nerdtree-tabs'
|
||||
let g:nerdtree_tabs_open_on_console_startup=1
|
||||
nnoremap <F7> :NERDTreeTabsToggle<cr> " Toggle the NERDTree
|
||||
|
||||
" Airline
|
||||
NeoBundle 'bling/vim-airline'
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline#extensions#tabline#enabled = 1 " Tab bar at top
|
||||
set t_Co=256
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
let g:airline_symbols.space = "\ua0"
|
||||
if has('statusline')
|
||||
set laststatus=2
|
||||
set statusline=%<%f\ " Filename
|
||||
set statusline+=%w%h%m%r " Options
|
||||
set statusline+=%{fugitive#statusline()} " Git Hotness
|
||||
set statusline+=\ [%{&ff}/%Y] " Filetype
|
||||
set statusline+=\ [%{getcwd()}] " Current dir
|
||||
set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
|
||||
endif
|
||||
|
||||
" UndoTree
|
||||
NeoBundle 'mbbill/undotree'
|
||||
nnoremap <F5> :UndotreeToggle<cr> " Show the undo tree
|
||||
let g:undotree_SplitWidth = 30
|
||||
|
||||
" Golang Support
|
||||
Plugin 'fatih/vim-go'
|
||||
NeoBundle 'fatih/vim-go'
|
||||
au FileType go nmap <Leader>gb <Plug>(go-doc)
|
||||
au FileType go nmap <Leader>gd <Plug>(go-def-tab)
|
||||
|
||||
" Python Support
|
||||
Plugin 'klen/python-mode'
|
||||
NeoBundle 'klen/python-mode'
|
||||
au FileType python let g:pymode_doc_bind = "<Leader>gb"
|
||||
au FileType python let g:pymode_rope_goto_definition_bind = "<Leader>gd"
|
||||
|
||||
" JSON Support
|
||||
nmap <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR>
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
|
||||
" Ctrl+P
|
||||
Plugin 'kien/ctrlp.vim'
|
||||
NeoBundle 'kien/ctrlp.vim'
|
||||
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
|
||||
let g:ctrlp_user_command = {
|
||||
@ -56,9 +93,17 @@ let g:ctrlp_user_command = {
|
||||
\ 'fallback': 'find %s -type f'
|
||||
\ }
|
||||
|
||||
call vundle#end()
|
||||
" Required:
|
||||
call neobundle#end()
|
||||
|
||||
" Required:
|
||||
filetype plugin indent on
|
||||
|
||||
" If there are uninstalled bundles found on startup,
|
||||
" this will conveniently prompt you to install them.
|
||||
NeoBundleCheck
|
||||
"End NeoBundle Scripts-------------------------
|
||||
|
||||
filetype plugin indent on " okay we can turn it back on
|
||||
syntax on " Turn on syntax highlighting
|
||||
set spell " Turn on spellchecking
|
||||
set number " Turn on line numbers
|
||||
@ -69,19 +114,32 @@ set iskeyword-=. " '.' is an end of word designator
|
||||
set iskeyword-=# " '#' is an end of word designator
|
||||
set iskeyword-=- " '-' is an end of word designator
|
||||
|
||||
let g:nerdtree_tabs_open_on_console_startup=1
|
||||
" Enable Ctrl+hjkl navigation between splits
|
||||
map <C-J> <C-W>j<C-W>_
|
||||
map <C-K> <C-W>k<C-W>_
|
||||
map <C-H> <C-W>h<C-W>_
|
||||
map <C-L> <C-W>l<C-W>_
|
||||
|
||||
let g:clang_user_options='|| exit 0'
|
||||
|
||||
cmap w!! w !sudo tee % >/dev/null
|
||||
|
||||
" JSON Support
|
||||
nmap <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR>
|
||||
let g:vim_json_syntax_conceal = 0
|
||||
|
||||
"""
|
||||
" Git Related Settings
|
||||
"""
|
||||
|
||||
highlight clear SignColumn " SignColumn should match background
|
||||
highlight clear LineNr " Current line number row will have same background color in relative mode
|
||||
|
||||
" Instead of reverting the cursor to the last position in the buffer, we
|
||||
" set it to the first line when editing a git commit message
|
||||
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
|
||||
|
||||
"""
|
||||
""
|
||||
" Look and Feel
|
||||
"""
|
||||
|
||||
@ -100,13 +158,16 @@ set colorcolumn=+1
|
||||
set list " Highlight white-space characters
|
||||
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " but only the ones we don't want
|
||||
|
||||
set pastetoggle=<F6>
|
||||
|
||||
if filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
|
||||
let g:solarized_termcolors=256
|
||||
let g:solarized_termtrans=1
|
||||
let g:solarized_contrast="normal"
|
||||
let g:solarized_visibility="normal"
|
||||
color solarized
|
||||
endif
|
||||
highlight ColorColumn ctermbg=2
|
||||
highlight ColorColumn ctermbg=24
|
||||
|
||||
" Command line
|
||||
set wildmenu " Show a menu rather than auto-completing
|
||||
@ -140,6 +201,7 @@ map <leader>tt :tabnext<cr>
|
||||
set backup
|
||||
set backupdir=$HOME/.vim/backups
|
||||
set directory=$HOME/.vim/swaps
|
||||
set undodir=$HOME/.vim/undo
|
||||
|
||||
if has('persistent_undo')
|
||||
set undofile " So is persistent undo ...
|
||||
|
Loading…
Reference in New Issue
Block a user