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
remotes/origin/headless
Shaun Reed 4 years ago
parent adf0255224
commit 138ccc7e51

@ -15,6 +15,8 @@ alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
export EDITOR="vim"
export VISUAL="vim"
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
export LIBCLANG=$(sudo find / -name libclang.so.1)

3
.gitmodules vendored

@ -20,3 +20,6 @@
path = .vim/bundle/vim-signify
url = https://github.com/mhinz/vim-signify
[submodule ".vim/bundle/ale"]
path = .vim/bundle/ale
url = https://github.com/dense-analysis/ale

@ -0,0 +1 @@
Subproject commit 7265ceb6d050d1a4642741d248f11e4f2abd37e1

@ -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/'
" 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
"
let g:clang_library_path = $LIBCLANG
" 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

@ -18,7 +18,7 @@ cd /path/to/dot/
stow -t ~ .
```
Note that the `dot/packages/` directory is for reference and is the only directory included not meant to be used with stow. If this directory is stowed there will be no real change to the system - you will still need to install the package lists manually.
I use the `libclang-10-dev` package for clang completion. You can use whichever version you want, as the `.vimrc` configuration hosted here uses an environment variable `$LIBCLANG` which is set using the output of `sudo find / -name libclang.so.1`. To use the same version as I do, simply run `sudo apt install libclang-10-dev`
`stow --adopt .` can be used to install conflicting files, but doing so will result in the loss of your local configurations. If you want to keep them, back up the conflicting files output in the error message before running this command.

@ -0,0 +1,5 @@
# A fix for a common issue found in virtual box
# https://forums.linuxmint.com/viewtopic.php?t=247850
# https://askubuntu.com/questions/1014172/virtualbox-unresponsive-area-on-desktop
#################################################################################
ps aux www |grep 'VBoxClient --draganddrop' | awk '{print $2}' | xargs kill
Loading…
Cancel
Save