Update vim configs

+ Conditionally use custom font
+ Fix ranger devicons
+ Add konsole profile
+ Conditionally eable default konsole profile
This commit is contained in:
Shaun Reed 2022-08-26 21:50:39 -04:00
parent 629ef32a26
commit e0ff2faeba
6 changed files with 59 additions and 39 deletions

View File

@ -30,10 +30,10 @@ export PATH=$PATH:/opt/:$HOME/.local/bin/:$HOME/.dotnet:$HOME/go/bin/
export DOTNET_ROOT=$HOME/.dotnet
# Example path for autocompletion using libclang-9-dev package, obtained by the following command
command -v clang &>/dev/null && export LIBCLANG="$(find /usr/ -name libclang.so.1 2>/dev/null)"
export LIBCLANG="$(command -v clang &>/dev/null && ldconfig -p | sort | grep libclang-[0-9]. | awk -F "> " '{print$2}' | tail -n 1)"
# Source a top-secret alias file
if [ -f ~/.bash_secrets ]; then
if [ -e ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
@ -41,9 +41,20 @@ if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] &&
exec tmux
fi
# Set the default terminal to use konsole, with Kapper profile
# Set the default terminal to use konsole, with kapper profile
# + Execute tmux on start
#export TERMINAL='konsole --profile Kapper -e tmux'
if [ -e ~/.local/share/konsole/kapper.profile ]; then
if command -v tmux &>/dev/null; then
export TERMINAL='konsole --profile kapper -e tmux'
else
export TERMINAL='konsole --profile kapper'
fi
fi
# Conditionally enables font glyphs in .vimrc if available
if [ -e ~/.local/share/fonts/sauce-code-pro.otf ]; then
export SAUCE=1
fi
# Less colors for man pages
export PAGER=less

View File

@ -764,3 +764,6 @@ tmap <delete> eval -q fm.ui.taskview.task_remove()
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
default_linemode devicons

Binary file not shown.

View File

@ -0,0 +1,7 @@
[Appearance]
ColorScheme=Breeze
Font=SauceCodePro Nerd Font Mono,10,-1,5,50,0,0,0,0,0
[General]
Name=kapper
Parent=FALLBACK/

50
.vimrc
View File

@ -145,32 +145,30 @@ if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
" TODO: Add condition to toggle unicode / airline symbols
" By default use unicode for compatability on all systems
" airline symbols
""let g:airline_left_sep = ''
""let g:airline_left_alt_sep = ''
""let g:airline_right_sep = ''
""let g:airline_right_alt_sep = ''
""let g:airline_symbols.branch = ''
""let g:airline_symbols.readonly = ''
""let g:airline_symbols.linenr = ''
if (exists("$SAUCE"))
" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
else
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
endif
" Clang completeion settings

View File

@ -11,7 +11,7 @@ Once installed, editing source code in vim supports features displayed in the sc
Easiest installation is to clone repository into home directory -
```bash
sudo apt install vim xsel xclip tmux ranger clang
sudo apt install vim xsel xclip tmux ranger clang yakuake
git clone --recursive https://github.com/shaunrd0/dot ~/dot
cd ~/dot/
stow --adopt .
@ -25,7 +25,9 @@ cd /path/to/dot/
stow --adopt -t ~ .
```
**Warning:** `--adopt` is used to link conflicting files, but doing so could result in the loss of some configs within your local copy of the repository. After running `stow --adopt .`, be sure to check `git status` is clean. If a file has been modified, discard the local changes to be up-to-date with `origin/master` and it will be restored on your system as well, since the files are now linked.
**Warning:** `--adopt` is used to link conflicting files, but doing so could result in the loss of some configs within your local copy of the repository and on your local system.
After running `stow --adopt .`, be sure to check `git status` is clean.
If a file has been modified, discard the local changes to be up-to-date with `origin/master` and it will be restored on your system as well, since the files are now linked.
We could run the following commands to restore changed files
```bash
@ -58,8 +60,6 @@ If you don't want clang completion, just remove the plugin directory from `~/.vi
If you don't remove clang completion and skip the following steps, vim will show errors when opening source code files. This is because these configurations use clang completion for source code auto completion and drop-down menus within vim.
Note that the `printf` command may take some time to finish, since it is searching your system for a needed file.
```bash
sudo apt install clang
source ~/.bashrc
@ -74,3 +74,4 @@ To enable the gitmux status bar in tmux sessions
sudo apt install golang-go
go install github.com/arl/gitmux@latest
```