diff --git a/.vimrc b/.vimrc index 404833c..a1ebc98 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,5 @@ -"Vundle stuff" +"Vundle stuff +"{{{ set nocompatible filetype off @@ -18,19 +19,36 @@ Plugin 'majutsushi/tagbar' Plugin 'petRUShka/vim-opencl' call vundle#end() +"}}} +"Syntax +"{{{ filetype plugin indent on syntax enable syntax sync maxlines=256 set synmaxcol=200 +"}}} "Options +"{{{ set expandtab set shiftwidth=4 set tabstop=4 set foldlevel=99 +set encoding=utf-8 +set number +set showmatch +set matchtime=2 + +set hlsearch +set incsearch + +set laststatus=2 +"set splitbelow +"}}} "Gui stuff +"{{{ set guifont=Consolas:h12 set guicursor=n-v-i-c:block-Cursor set guioptions-=e @@ -42,34 +60,32 @@ set guioptions-=m set guioptions-=T set langmenu=en_US.UTF-8 +"}}} -set encoding=utf-8 -set number -set showmatch -set matchtime=2 - -set hlsearch -set incsearch - -set laststatus=2 -"set splitbelow "Colors +"{{{ colorscheme izi "let g:airline_theme='light' +""}}} "Tagbar stuff +"{{{ let g:tagbar_ctags_bin = '/usr/local/bin/ctags' let g:tagbar_autofocus = 1 +"}}} "YouCompleteMe stuff +"{{{ set completeopt-=preview let g:ycm_autoclose_preview_window_after_completion = 1 let g:ycm_global_ycm_extra_conf = '~/.ycm_global_extra_config.py' let g:ycm_python_binary_path = '/usr/local/bin/python3' let g:syntastic_python_python_exec = '/usr/local/bin/python3' set shortmess+=c +"}}} "Mappings +"{{{ let mapleader = "," let maplocalleader = "," nnoremap q @@ -96,8 +112,10 @@ vnoremap "+y onoremap p i( onoremap qd i" onoremap qs i' +"}}} "Mappings for Plugins +"{{{ nnoremap N :NERDTree nnoremap r :AirlineRefresh nnoremap ] :YcmCompleter GoTo @@ -105,6 +123,9 @@ nnoremap ye :YcmShowDetailedDiagnostic nnoremap yf :YcmCompleter FixIt:ccl nnoremap yd :YcmDiags nnoremap T :TagbarToggle +"}}} "Abbreviations +"{{{ iabbrev rr return +"}}} diff --git a/ftplugin/c.vim b/ftplugin/c.vim index 713192e..90e75e5 100644 --- a/ftplugin/c.vim +++ b/ftplugin/c.vim @@ -3,9 +3,9 @@ iabbrev im(a) int main(int argc, const char** argv) iabbrev maw #pragma message("malloc warning!") nnoremap fb ][% nnoremap fe ][ -nnoremap c I// +nnoremap c mcI//`c:delm c vnoremap c `>o*/` -nnoremap xc mx/\*\/dd?\/\*dd`x:noh:delm x +nnoremap xc mx^xx`x:delm x nnoremap xb mx?\/\*dd/\*\/dd`x:noh:delm x setlocal foldmethod=syntax foldlevel=99 diff --git a/ftplugin/make.vim b/ftplugin/make.vim index 13f1a72..28807d8 100644 --- a/ftplugin/make.vim +++ b/ftplugin/make.vim @@ -1 +1 @@ -setlocal noexpandtab softtabstop=0 shiftwidth=8 tabstop=8 +setlocal noexpandtab shiftwidth=8 tabstop=8 diff --git a/ftplugin/python.vim b/ftplugin/python.vim index 2d27cb6..34f5c1c 100644 --- a/ftplugin/python.vim +++ b/ftplugin/python.vim @@ -1,2 +1,5 @@ -nnoremap c I# -vnoremap c `>o"""` +nnoremap c mcI#`c:delm x +vnoremap c `>o"""` + +nnoremap xb mx?"""dd/"""dd`x:noh:delm x +nnoremap xc mx?#x`x:noh:delm x diff --git a/ftplugin/vim.vim b/ftplugin/vim.vim index 3309d9b..7e1ca58 100644 --- a/ftplugin/vim.vim +++ b/ftplugin/vim.vim @@ -1,4 +1,5 @@ -nnoremap c I" +setlocal foldmethod=marker +nnoremap c mcI"`c:delm c vnoremap f `>o"}}}` nnoremap xf mx?"{{{dd/"}}}dd`x:noh:delm x -nnoremap xc mx^0x`x +nnoremap xc mx^x`x