Replace .vimrc
This commit is contained in:
parent
54074ee674
commit
0cac80e8e5
95
.vimrc
95
.vimrc
|
@ -1,3 +1,5 @@
|
||||||
|
let VIMHOME = split(&rtp, ",")[0]
|
||||||
|
|
||||||
" Vundle package managment
|
" Vundle package managment
|
||||||
set nocompatible
|
set nocompatible
|
||||||
filetype off
|
filetype off
|
||||||
|
@ -6,7 +8,8 @@ call vundle#begin()
|
||||||
Plugin 'altercation/vim-colors-solarized'
|
Plugin 'altercation/vim-colors-solarized'
|
||||||
Plugin 'cohama/lexima.vim'
|
Plugin 'cohama/lexima.vim'
|
||||||
Plugin 'gmarik/Vundle.vim'
|
Plugin 'gmarik/Vundle.vim'
|
||||||
Plugin 'bling/vim-airline'
|
Plugin 'vim-airline/vim-airline'
|
||||||
|
Plugin 'vim-airline/vim-airline-themes'
|
||||||
Plugin 'easymotion/vim-easymotion'
|
Plugin 'easymotion/vim-easymotion'
|
||||||
Plugin 'hdima/python-syntax'
|
Plugin 'hdima/python-syntax'
|
||||||
Plugin 'scrooloose/syntastic'
|
Plugin 'scrooloose/syntastic'
|
||||||
|
@ -22,6 +25,7 @@ Plugin 'Valloric/YouCompleteMe'
|
||||||
Plugin 'rhysd/vim-clang-format'
|
Plugin 'rhysd/vim-clang-format'
|
||||||
Plugin 'tmux-plugins/vim-tmux'
|
Plugin 'tmux-plugins/vim-tmux'
|
||||||
Plugin 'tmux-plugins/vim-tmux-focus-events'
|
Plugin 'tmux-plugins/vim-tmux-focus-events'
|
||||||
|
Plugin 'christoomey/vim-tmux-navigator'
|
||||||
Plugin 'Valloric/ListToggle'
|
Plugin 'Valloric/ListToggle'
|
||||||
Plugin 'jeetsukumaran/vim-buffergator'
|
Plugin 'jeetsukumaran/vim-buffergator'
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
|
@ -37,6 +41,8 @@ let mapleader=","
|
||||||
:command Q q
|
:command Q q
|
||||||
:command WQ wq
|
:command WQ wq
|
||||||
:command Wq wq
|
:command Wq wq
|
||||||
|
nnoremap j gj
|
||||||
|
nnoremap k gk
|
||||||
|
|
||||||
"python with virtualenv support
|
"python with virtualenv support
|
||||||
py << EOF
|
py << EOF
|
||||||
|
@ -48,6 +54,10 @@ if 'VIRTUAL_ENV' in os.environ:
|
||||||
execfile(activate_this, dict(__file__=activate_this))
|
execfile(activate_this, dict(__file__=activate_this))
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
" don't store .swp files in the file's own directory
|
||||||
|
" neither for .ext~ files
|
||||||
|
set directory=/home/billie/.vim/tmp/
|
||||||
|
set backupdir=/home/billie/.vim/tmp/
|
||||||
|
|
||||||
" Autoindent for filetype
|
" Autoindent for filetype
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
@ -72,15 +82,75 @@ set hidden
|
||||||
|
|
||||||
let g:clang_format#style_options = {
|
let g:clang_format#style_options = {
|
||||||
\ "AccessModifierOffset" : -4,
|
\ "AccessModifierOffset" : -4,
|
||||||
|
\ "AlignAfterOpenBracket" : "true",
|
||||||
|
\ "AlignEscapedNewlinesLeft" : "false",
|
||||||
|
\ "AlignOperands" : "false",
|
||||||
|
\ "AlignTrailingComments" : "true",
|
||||||
|
\ "AllowAllParametersOfDeclarationOnNextLine" : "true",
|
||||||
|
\ "AllowShortBlocksOnASingleLine" : "false",
|
||||||
|
\ "AllowShortCaseLabelsOnASingleLine" : "false",
|
||||||
|
\ "AllowShortFunctionsOnASingleLine" : "All",
|
||||||
\ "AllowShortIfStatementsOnASingleLine" : "true",
|
\ "AllowShortIfStatementsOnASingleLine" : "true",
|
||||||
|
\ "AllowShortLoopsOnASingleLine" : "true",
|
||||||
|
\ "AlwaysBreakAfterDefinitionReturnType" : "false",
|
||||||
|
\ "AlwaysBreakBeforeMultilineStrings" : "false",
|
||||||
\ "AlwaysBreakTemplateDeclarations" : "true",
|
\ "AlwaysBreakTemplateDeclarations" : "true",
|
||||||
\ "Standard" : "C++11"}
|
\ "BinPackArguments" : "true",
|
||||||
let g:clang_format#code_style = 'llvm'
|
\ "BinPackParameters" : "true",
|
||||||
|
\ "BreakBeforeBinaryOperators" : "None",
|
||||||
|
\ "BreakBeforeBraces" : "Attach",
|
||||||
|
\ "BreakBeforeTernaryOperators" : "true",
|
||||||
|
\ "BreakConstructorInitializersBeforeComma" : "false",
|
||||||
|
\ "ColumnLimit" : 0,
|
||||||
|
\ "ConstructorInitializerAllOnOneLineOrOnePerLine" : "true",
|
||||||
|
\ "ConstructorInitializerIndentWidth" : 4,
|
||||||
|
\ "ContinuationIndentWidth" : 4,
|
||||||
|
\ "Cpp11BracedListStyle" : "true",
|
||||||
|
\ "DerivePointerAlignment" : "true",
|
||||||
|
\ "DisableFormat" : "false",
|
||||||
|
\ "ExperimentalAutoDetectBinPacking" : "false",
|
||||||
|
\ "IndentCaseLabels" : "true",
|
||||||
|
\ "IndentWidth" : 4,
|
||||||
|
\ "IndentWrappedFunctionNames" : "false",
|
||||||
|
\ "KeepEmptyLinesAtTheStartOfBlocks" : "false",
|
||||||
|
\ "Language" : "Cpp",
|
||||||
|
\ "MaxEmptyLinesToKeep" : 1,
|
||||||
|
\ "NamespaceIndentation" : "None",
|
||||||
|
\ "ObjCBlockIndentWidth" : 4,
|
||||||
|
\ "ObjCSpaceAfterProperty" : "false",
|
||||||
|
\ "ObjCSpaceBeforeProtocolList" : "false",
|
||||||
|
\ "PenaltyBreakBeforeFirstCallParameter" : 1,
|
||||||
|
\ "PenaltyBreakComment" : 300,
|
||||||
|
\ "PenaltyBreakFirstLessLess" : 120,
|
||||||
|
\ "PenaltyBreakString" : 1000,
|
||||||
|
\ "PenaltyExcessCharacter" : 1000000,
|
||||||
|
\ "PenaltyReturnTypeOnItsOwnLine" : 200,
|
||||||
|
\ "PointerAlignment" : "Left",
|
||||||
|
\ "SpaceAfterCStyleCast" : "false",
|
||||||
|
\ "SpaceBeforeAssignmentOperators" : "true",
|
||||||
|
\ "SpaceBeforeParens" : "ControlStatements",
|
||||||
|
\ "SpaceInEmptyParentheses" : "false",
|
||||||
|
\ "SpacesBeforeTrailingComments" : 4,
|
||||||
|
\ "SpacesInAngles" : "false",
|
||||||
|
\ "SpacesInCStyleCastParentheses" : "false",
|
||||||
|
\ "SpacesInContainerLiterals" : "true",
|
||||||
|
\ "SpacesInParentheses" : "false",
|
||||||
|
\ "SpacesInSquareBrackets" : "false",
|
||||||
|
\ "Standard" : "Auto",
|
||||||
|
\ "TabWidth" : 4,
|
||||||
|
\ "UseTab" : "Never"}
|
||||||
|
|
||||||
|
let g:clang_format#code_style = 'Google'
|
||||||
" Line numbering
|
" Line numbering
|
||||||
set number
|
set number
|
||||||
set numberwidth=4
|
set numberwidth=4
|
||||||
:set mouse=a
|
:set mouse=a
|
||||||
|
|
||||||
|
" Allow xterm-key usage inside tmux
|
||||||
|
execute "set <xUp>=\e[1;*A"
|
||||||
|
execute "set <xDown>=\e[1;*B"
|
||||||
|
execute "set <xRight>=\e[1;*C"
|
||||||
|
execute "set <xLeft>=\e[1;*D"
|
||||||
|
|
||||||
" Persistent undo
|
" Persistent undo
|
||||||
set undodir=~/.vim/undodir/
|
set undodir=~/.vim/undodir/
|
||||||
|
@ -106,15 +176,24 @@ endif
|
||||||
|
|
||||||
" Quickfix
|
" Quickfix
|
||||||
nnoremap <silent> <leader>f :YcmCompleter FixIt<CR>
|
nnoremap <silent> <leader>f :YcmCompleter FixIt<CR>
|
||||||
|
nnoremap <silent> <leader>g :YcmCompleter GoTo<CR>
|
||||||
|
|
||||||
|
|
||||||
" Terminal colors
|
" Terminal colors
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
|
let g:airline_theme="solarized"
|
||||||
|
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
|
" Commenting
|
||||||
|
nnoremap <silent> <leader>c :TComment<CR>
|
||||||
|
nnoremap <silent> <leader>C :TCommentBlock<CR>
|
||||||
|
vnoremap <silent> <leader>c :TCommentInline<CR>
|
||||||
|
vnoremap <silent> <leader>C :TCommentBlock<CR>
|
||||||
|
|
||||||
" Tab completion
|
" Tab completion
|
||||||
set wildmode=longest,list
|
set wildmode=longest,list
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
@ -130,3 +209,13 @@ let python_highlight_all=1
|
||||||
set background=dark
|
set background=dark
|
||||||
let g:solarized_termcolors=256
|
let g:solarized_termcolors=256
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
|
let g:tmux_navigator_no_mappings = 1
|
||||||
|
|
||||||
|
nnoremap <silent> {Left-mapping} :TmuxNavigateLeft<cr>
|
||||||
|
nnoremap <silent> {Down-Mapping} :TmuxNavigateDown<cr>
|
||||||
|
nnoremap <silent> {Up-Mapping} :TmuxNavigateUp<cr>
|
||||||
|
nnoremap <silent> {Right-Mapping} :TmuxNavigateRight<cr>
|
||||||
|
nnoremap <silent> {Previous-Mapping} :TmuxNavigatePrevious<cr>
|
||||||
|
let g:tmux_navigator_save_on_switch = 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue