Created
October 5, 2020 16:33
-
-
Save Jay-Madden/dd3f396db14b4ea36099157daea739fa to your computer and use it in GitHub Desktop.
vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
"Plugin 'Valloric/YouCompleteMe' | |
"Plugin 'Valloric/iCompleteMe' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'tpope/vim-surround' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'terryma/vim-multiple-cursors' | |
"Plugin 'yggdroot/indentline' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'octol/vim-cpp-enhanced-highlight' | |
Plugin 'artur-shaik/vim-javacomplete2' | |
"Plugin 'ryanoasis/vim-devicons' | |
Plugin 'taghighlight' | |
"keiths plugin | |
Plugin 'swift.vim' | |
"apples plugin | |
"Plugin 'swiftOfficial' | |
Plugin 'syntastic-swift' | |
"Plugin 'file:///Users/JayMadden/swift',{'rtp': 'utils/vim/','name': 'Swift-Syntax'} | |
"swift integration | |
let g:syntastic_swift_checkers = ['swiftpm', 'swiftlint'] | |
let g:syntastic_aggregate_errors = 1 | |
let g:syntastic_swift_checkers = ['swift'] | |
call vundle#end() | |
autocmd BufEnter * colorscheme solarized | |
autocmd BufEnter *.swift colorscheme solarizedSwift | |
autocmd BufEnter *.txt syntax off | |
" Highlight all function names | |
"syntax match cCustomFunc /\w\+\s*(/me=e-1,he=e-1 | |
"highlight def link cCustomFunc Function | |
"Basic DotFile | |
syntax on | |
filetype plugin indent on | |
set number | |
"set cursorline | |
set virtualedit=onemore | |
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE | |
set mouse=a | |
set clipboard=unnamed | |
set tabstop=4 | |
set shiftwidth=4 | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_SR = "\<Esc>]50;CursorShape=2\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
"key binding for going back to normal mode | |
imap jj <Esc> | |
"key binding for swtiching windows easier | |
"set autochdir | |
map <Tab> <C-W><C-W> | |
set backspace=indent,eol,start | |
"autoclosing characters | |
inoremap { {}<Left> | |
inoremap {<CR> {<CR>}<Esc>O | |
inoremap {{ { | |
inoremap {} {} | |
inoremap /** /***/<Left> | |
inoremap /**<CR> /**<CR>*/<Esc>O | |
inoremap /**/** /** | |
inoremap /***/ /***/ | |
" () | |
inoremap ( ()<Left> | |
inoremap <expr> ) strpart(getline('.'), col('.')-1, 1) == ")" ? "\<Right>" : ")" | |
inoremap [ []<Left> | |
inoremap <expr> ] strpart(getline('.'), col('.')-1, 1) == "]" ? "\<Right>" : "]" | |
"Airlin | |
set laststatus=2 | |
let g:airline_theme='dark' | |
"enhanced c++ syntax octol | |
let g:cpp_experimental_template_highlight = 1 | |
let g:cpp_class_scope_highlight = 1 | |
let g:cpp_member_variable_highlight = 1 | |
"NerdTree | |
let g:NERDTreeWinPos = "left" | |
map <C-x> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
"autocmd VimEnter * :NERDTreeToggle | |
inoremap <Up> <NOP> | |
inoremap <Down> <NOP> | |
inoremap <Left> <NOP> | |
inoremap <Right> <NOP> | |
noremap <Up> <NOP> | |
noremap <Down> <NOP> | |
noremap <Left> <NOP> | |
noremap <Right> <NOP> | |
"dev icons | |
set encoding=utf8 | |
"javacomplete2 | |
autocmd FileType java setlocal omnifunc=javacomplete#Complete | |
nmap <F5> <Plug>(JavaComplete-Imports-Add) | |
imap <F5> <Plug>(JavaComplete-Imports-Add) | |
nmap <F6> <Plug>(JavaComplete-Imports-AddMissing) | |
imap <F6> <Plug>(JavaComplete-Imports-AddMissing) | |
nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused) | |
imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused) | |
"Syntastic | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_cpp_compiler_options = "-std=c++98" | |
"-Wall -Wextra -Wpedantic" | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
"You Complete Me | |
let g:ycm_show_diagnostics_ui = 0 | |
"Tagbar | |
nmap <C-c> :TagbarToggle<CR> | |
set encoding=utf-8 | |
"let g:tagbar_ctags_bin = '/usr/local/Cellar/ctags/5.8_1' | |
" Add highlighting for function definition in C++ | |
function! EnhanceCppSyntax() | |
syn match cppFuncDef "::\~\?\zs\h\w*\ze([^)]*\()\s*\(const\)\?\)\?$" | |
hi def link cppFuncDef Special | |
endfunction | |
autocmd Syntax cpp call EnhanceCppSyntax() | |
"highlighting for str!ngss in cpp | |
highlight MyGroup1 ctermfg=DarkGreen | |
match MyGroup1 /string/ | |
set background=dark | |
"solarized options | |
"let g:solarized_visibility = "high" | |
"let g:solarized_contrast = "high" | |
"colorscheme solarized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment