vimwiki: dth @ DK023900WSL

This commit is contained in:
DannyDannyDanny 2022-10-13 15:57:13 +02:00
parent c58f1e13e5
commit 283a9f0c15
7 changed files with 141 additions and 13 deletions

View file

@ -158,5 +158,5 @@ schemes:
# colors: *gruvbox_material_medium_light
# colors: *gruvbox_material_soft_light
# colors: *gruvbox_material_soft_light
colors: *gruvbox_material_soft_dark
colors: *gruvbox_material_soft_light
# colors: *gruvbox_material_soft_dark

View file

@ -1,5 +1,7 @@
let mapleader =","
" set termguicolors
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
@ -11,7 +13,7 @@ call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"
Plug 'tpope/vim-surround' " surround for parentheses, brackets, quotes, XML tags etc
Plug 'tpope/vim-fugitive' " git helper
Plug 'preservim/nerdtree' " file tree
Plug 'jreybert/vimagit' " git diffing with :Magit
" Plug 'jreybert/vimagit' " git diffing with :Magit
Plug 'lukesmithxyz/vimling' " toggle deadkeys, IPA, prose-mode
Plug 'junegunn/goyo.vim' " prose mode but better
Plug 'vimwiki/vimwiki' " take notes in vimwiki
@ -22,25 +24,31 @@ Plug 'tpope/vim-commentary' " comment out word / line with 'gc'
Plug 'ap/vim-css-color' " show css colors
Plug 'editorconfig/editorconfig-vim' " editor-config extension for vim
Plug 'scrooloose/syntastic' " syntax checker
Plug 'airblade/vim-gitgutter' " show git diff insertions / deletions
Plug 'junegunn/vim-emoji' " emoji autocomplete + emojis in gitgutter
" Plug 'airblade/vim-gitgutter' " show git diff insertions / deletions
" Plug 'junegunn/vim-emoji' " emoji autocomplete + emojis in gitgutter
Plug 'rrethy/vim-illuminate' " highlight other uses of the current word under the cursor
" Plug 'jupyter-vim/jupyter-vim' " one day we'll start using jupyter in vim
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " fuzzy-finder
Plug 'ibhagwan/fzf-lua', {'branch': 'main'}
" optional for icon support
Plug 'kyazdani42/nvim-web-devicons'
call plug#end()
" fuzzy find with ctrl + P
nnoremap <c-P> <cmd>lua require('fzf-lua').files()<CR>
" show invisibles
set fileencoding=utf-8
set list
set listchars=tab:→\ ,nbsp:␣,trail:•,precedes,extends
" vim-emoji setup
set completefunc=emoji#complete
let g:gitgutter_sign_added = emoji#for('small_blue_diamond')
let g:gitgutter_sign_modified = emoji#for('small_orange_diamond')
let g:gitgutter_sign_removed = emoji#for('small_red_triangle')
let g:gitgutter_sign_modified_removed = emoji#for('collision')
" set completefunc=emoji#complete
" let g:gitgutter_sign_added = emoji#for('small_blue_diamond')
" let g:gitgutter_sign_modified = emoji#for('small_orange_diamond')
" let g:gitgutter_sign_removed = emoji#for('small_red_triangle')
" let g:gitgutter_sign_modified_removed = emoji#for('collision')
" syntastic recommended settings

View file

@ -46,8 +46,10 @@ Here's what I've done so far:
* get local admin rights
* [install powertoys](https://docs.microsoft.com/en-us/windows/powertoys/install#install-with-windows-executable-file-via-github)
* remap CAPS LOCK to L-CTRL
* install glasswire network monitor
* install basic miktex (for LaTeX)
* install [alacritty](https://alacritty.org/) (use the installer, not portable)
* install [wsl](https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command)
* install [wsl](https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command) + WSL specifics
* fix wsl dns issue via [stackoverflow](https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error/91595#comment1911934_91595)
* write wsl.conf:
* `sudo touch /etc/wsl.conf`
@ -59,8 +61,9 @@ Here's what I've done so far:
* add content `echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null`
* add alacritty config: `/mnt/c/Users/<winuser>/AppData/Roaming/alacritty/alacritty.yml`
* add private folder symlink: `ln -s -f /mnt/c/Users/<winuser>/Private ~/Private`
* follow Ubuntu guide:
* `apt install neovim` (NVIM v0.4.3) - consider
* `apt install texlive`
* `apt install texlive texlive-latex-extra`
* setup [ssh github](ubuntu.md#setup-ssh-key-for-github)
* install [zsh + omz](ubuntu.md#apt-package)
* clone this (dotfiles) repo and `cd dotfiles`

View file

@ -11,3 +11,8 @@ mousewheel.default.delta_multiplier_y: 10
```
> [source](https://www.reddit.com/r/firefox/comments/mq9g52/linux_firefox_performancemacos_like_mouse_wheel/)
## other firefox config
* new tabs open next to current tab
* `browser.tabs.insertAfterCurrent = true`

View file

@ -5,7 +5,7 @@ setup_zshrc:
ln -s -f ~/dotfiles/.zshrc ~/.zshrc
setup_alacritty_wsl:
ln -s -f ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml
cp ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml
setup_alacritty:
mkdir -p ~/.config/alacritty

109
scripts/24-bit-color.sh Normal file
View file

@ -0,0 +1,109 @@
#!/bin/bash
# This file was originally taken (by JohnMorales) from iterm2:
# https://github.com/gnachman/iTerm2/blob/master/tests/24-bit-color.sh
# This file was then taken by (DannyDannyDanny) from JohnMorales:
# https://github.com/JohnMorales/dotfiles/blob/master/colors/24-bit-color.sh
#
# This file echoes a bunch of 24-bit color codes
# to the terminal to demonstrate its functionality.
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
# <r> <g> <b> range from 0 to 255 inclusive.
# The escape sequence ^[0m returns output to default
#
# The script can be run using if cloned locally
# $ bash <path>/scripts/24-bit-color.sh
#
# Alternatively download the script and pipe it into bash:
# $ curl -s https://raw.githubusercontent.com/DannyDannyDanny/dotfiles/main/scripts/24-bit-color.sh | bash
setBackgroundColor()
{
#printf '\x1bPtmux;\x1b\x1b[48;2;%s;%s;%sm' $1 $2 $3
printf '\x1b[48;2;%s;%s;%sm' $1 $2 $3
}
resetOutput()
{
echo -en "\x1b[0m\n"
}
# Gives a color $1/255 % along HSV
# Who knows what happens when $1 is outside 0-255
# Echoes "$red $green $blue" where
# $red $green and $blue are integers
# ranging between 0 and 255 inclusive
rainbowColor()
{
let h=$1/43
let f=$1-43*$h
let t=$f*255/43
let q=255-t
if [ $h -eq 0 ]
then
echo "255 $t 0"
elif [ $h -eq 1 ]
then
echo "$q 255 0"
elif [ $h -eq 2 ]
then
echo "0 255 $t"
elif [ $h -eq 3 ]
then
echo "0 $q 255"
elif [ $h -eq 4 ]
then
echo "$t 0 255"
elif [ $h -eq 5 ]
then
echo "255 0 $q"
else
# execution should never reach here
echo "0 0 0"
fi
}
for i in `seq 0 127`; do
setBackgroundColor $i 0 0
echo -en " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor $i 0 0
echo -en " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor 0 $i 0
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor 0 $i 0
echo -n " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor 0 0 $i
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor 0 0 $i
echo -n " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor `rainbowColor $i`
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor `rainbowColor $i`
echo -n " "
done
resetOutput

View file

@ -96,6 +96,9 @@ open terminal, run one code snippet at the time and check that no errors occur:
sudo apt install git -y # version control
# sudo apt install neovim -y # brew install nvim to get version 0.7
# install neovim - src: https://vi.stackexchange.com/a/38348
# sudo apt install librewolf -y # add librewolf repo first
sudo apt install qutebrowser -y # minimal vim-binding browser
sudo apt install gnome-tweaks -y # tool to remap caps to ctrl