add vim nnoremaps for compilations

This commit is contained in:
Julin S 2021-10-26 23:36:52 +05:30
parent 23056ef6d9
commit a9289d8504
6 changed files with 47 additions and 12 deletions

View File

@ -189,6 +189,7 @@
((?T ?N) . ?\x2204) ; ∄ (Since ∃ is TE)
((?n ?<) . ?\x219a) ; ↚ (Since ← is <-)
((?n ?>) . ?\x219b) ; ↛ (Since → is ->)
((?- ?^) . ?\x2191) ; ↑ (Since ↓ is -v)
((?p ?r) . ?\x22a2) ; ⊢
((?M ?O) . ?\x22a8) ; ⊨
((?n ?p) . ?\x22ac) ; ⊬

View File

@ -131,15 +131,6 @@ hc set smart_frame_surroundings 1
hc set mouse_recenter_gap 0
# Find the panel
panel=~/.config/herbstluftwm/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
# start it on each monitor
"$panel" $monitor &
done
# Create a margin on the left
hc set_monitors 1256x768+120+0 # 1366x768
@ -183,5 +174,14 @@ hc keybind XF86MonBrightnessDown spawn xbacklight -dec 1%
#hc keybind XF86AudioNext spawn playerctl next
# Lock screen
hc keybind Control-Shift-l spawn bash -c 'i3lock -c 000000 && exec sleep 5s && exec systemctl suspend'
hc keybind Control-Shift-l spawn bash -c 'i3lock -c 000000 && sleep 5s && exec systemctl suspend'
hc keybind Mod4-l spawn i3lock -c 444444
# Find the panel
panel=~/.config/herbstluftwm/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
# start it on each monitor
"$panel" $monitor &
done

View File

@ -72,7 +72,8 @@ with config.pattern("*://.youtube.com") as youtube:
with config.pattern("*//.amazon.*") as amazon:
amazon.content.cookies.accept = "never"
# Temporary workaround to prevent some websites from crashing qute
# Temporary workaround to prevent some websites from crashing qutebrowser
# https://github.com/qutebrowser/qutebrowser/issues/5634
c.qt.workarounds.remove_service_workers = True
## Statusbar

View File

@ -6,6 +6,10 @@ cp git/.gitconfig $HOME_PATH
cp emacs/.emacs $HOME_PATH
cp tmux/.tmux.conf $HOME_PATH
cp .profile $HOME_PATH
cp .bashrc $HOME_PATH
cp .Xresources $HOME_PATH
cp mutt/.mailcap $HOME_PATH
cp mutt/.muttrc $HOME_PATH
@ -31,3 +35,9 @@ cp qutebrowser/config.py $HOME_PATH/.config/qutebrowser/
mkdir -p $HOME_PATH/.config/zathura/
cp zathura/zathurarc.py $HOME_PATH/.config/zathura/
#mkdir -p $HOME_PATH/.config/awesome/
#cp awesomewm/rc.lua $HOME_PATH/.config/awesome/
mkdir -p $HOME_PATH/.config/herbstluftwm/
cp herbstluftwm/autostart $HOME_PATH/.config/herbstluftwm/

View File

@ -1,4 +1,4 @@
"set filetype plugin on
filetype plugin on
"set filetype indent on
" Syntax highlighting on
@ -43,3 +43,24 @@ endif
autocmd! TabLeave * let g:last_tab_backup = g:last_tab | let g:last_tab = tabpagenr()
autocmd! TabClosed * let g:last_tab = g:last_tab_backup
nmap <silent> gl :exe "tabn " . g:last_tab<cr>
" https://stackoverflow.com/questions/18296192/vim-compile-and-run-shortcut
" au is short for autocmd
autocmd filetype c nnoremap <F4> :w <bar> exec '!gcc '.shellescape('%').' -o a.out && ./a.out'<CR>
autocmd filetype cpp nnoremap <F4> :w <bar> exec '!g++ '.shellescape('%').' -o a.out && ./a.out'<CR>
autocmd filetype python nnoremap <F4> :w <bar> exec '!python3 '.shellescape('%')<CR>
autocmd filetype haskell nnoremap <F4> :w <bar> exec '!ghc '.shellescape('%').' -o a.out && ./a.out'<CR>
autocmd filetype tex nnoremap <F4> :w <bar> exec '!pdflatex '.shellescape('%')<CR>
autocmd filetype dot nnoremap <F4> :w % <bar> exec '!dot -Tps '.shellescape('%').' -o '.shellescape('%:r').'.ps'<CR>"
"autocmd filetype bash nnoremap <F4> :w % <bar> exec '!bash '.shellescape('%')<CR>"
" texttt
autocmd filetype tex nnoremap <Leader>t ciw\texttt{<Esc>pa}<Esc>
" textit
autocmd filetype tex nnoremap <Leader>i ciw\textit{<Esc>pa}<Esc>
" textbf
autocmd filetype tex nnoremap <Leader>b ciw\textbf{<Esc>pa}<Esc>

View File

@ -22,6 +22,8 @@ set recolor-darkcolor "#000000"
# Duplicate key bindings for scrolling
map [normal] <C-e> scroll down
map [normal] <C-y> scroll up
map [normal] <PageDown> scroll full-down
map [normal] <PageUp> scroll full-up
# Don't make it that easy to quit zathura
unmap q