Make path to libclang universal, update vimrc

Added Ale plugin for running linters
+ Changed unicode error and warning symbols
+ Added keybind for moving to next / previous errors

Update vimrc to use environment variable /usr/lib/llvm-10/lib/libclang.so.1 for clang path
+ This is automatically adjusted to the system clang path via output of 'find / -name libclang.so.1'
+ Requires some derivative of libclang to be installed, along with clang

Add whitespace check function to vimrc
+ Removes whitespaces from every relative file saved with vim
+ list of files found within ~/.vimrc

Add Colorizer plugin keybind for toggling color highlights within vim

Add environment variables $EDITOR and $VISUAL and set both to point to vim

Add a script to fix a common issue in vbox displays
+ running fix-vbox.sh corrects unclickable portion of the screen
This commit is contained in:
2020-06-11 13:23:03 -04:00
parent adf0255224
commit 138ccc7e51
6 changed files with 48 additions and 23 deletions

56
.vimrc
View File

@@ -3,6 +3,21 @@
" General Vim Settings
" Define function in vim to remove whitespace
fun! TrimWhitespace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
endfun
"Call this on every attempt to save a file of types defined below..
autocmd BufWritePre *.cpp,*.h,*.c,*.php :call TrimWhitespace()
""autocmd BufWritePre *.cpp,*.h,*.c,*.php :%s/\s\+$//ge
" Set terminal title when opening file
"" autocmd BufEnter * let &titlestring = ' ' . expand("%:t")
"" set title
" Set tabwidth=2, adjust Vim shiftwidth to the same
set tabstop=2 shiftwidth=2
@@ -57,35 +72,34 @@ let g:airline_theme='kalisi'
" Gitgutter installed for + - diffs in gutters within repo files
" Syntastic syntax checker settings
" See :help syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
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
" Ale linter settings
" Hover detail info in preview window
let g:ale_hover_to_preview = 1
" Hover detail info in balloons
""let g:ale_set_balloons = 1
let g:ale_sign_error = '🗙'
let g:ale_sign_warning = '⚠'
highlight ALEWarningSign ctermbg=Yellow
highlight ALEWarningSign ctermfg=Black
highlight ALEWarning ctermbg=DarkYellow
highlight ALEWarning ctermfg=White
highlight ALEErrorSign ctermbg=DarkRed
highlight ALEErrorSign ctermfg=White
highlight ALEError ctermfg=DarkRed
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
" Clang_complete settings
let g:clang_library_path='/usr/lib/llvm-8/lib/'
let g:clang_library_path = $LIBCLANG
" Understand how the plugin works: :h signify-modus-operandi
" Spare the plugin some work and read: :h g:signify_vcs_list
" Signify plugin settings
" Diff gutter within Vim
" let g:signify_vcs_list = ['git', 'hg']
" let g:signify_cursorhold_insert = 1
" let g:signify_cursorhold_normal = 1
" let g:signify_update_on_bufenter = 0
" let g:signify_update_on_focusgained = 1
"
" Colorizer plugin settings
" See :h colorizer in Vim for more info
"let g:colorizer_colornames = 0 " Don't color literal names, like red, green, etc
"let g:colorizer_auto_color = 1
let g:colorizer_auto_color = 1
"let g:colorizer_skip_comments = 1
"let g:colorizer_auto_filetype ='css,html,vim'
nnoremap <C-c> :ColorToggle<CR>
" Symbols important to vim / terminal layouts