aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/qutebrowser/config.py3
-rw-r--r--config/vim/vimrc19
-rwxr-xr-xconfig/x11/xinitrc2
-rw-r--r--config/zsh/aliases.zsh2
-rwxr-xr-xconfig/zsh/zprofile1
5 files changed, 24 insertions, 3 deletions
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py
index db7c2da..580fd40 100644
--- a/config/qutebrowser/config.py
+++ b/config/qutebrowser/config.py
@@ -45,6 +45,8 @@ c.url.searchengines = {
'sk': 'https://scikit-learn.org/stable/search.html?q={}',
'imdb': 'https://www.imdb.com/find?q={}',
'wiby': 'https://wiby.me/?q={}',
+ 'dlfren': 'https://www.deepl.com/translator#fr/en/{}',
+ 'dlenfr': 'https://www.deepl.com/translator#en/fr/{}',
}
c.fonts.default_family = ['Fira Mono', 'Baekmuk', 'Symbola']
@@ -131,6 +133,7 @@ if home_path is not None:
c.downloads.remove_finished = 5000
c.tabs.last_close = 'startpage'
+c.tabs.new_position.unrelated = 'next'
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
diff --git a/config/vim/vimrc b/config/vim/vimrc
index 7d2441b..f815bbd 100644
--- a/config/vim/vimrc
+++ b/config/vim/vimrc
@@ -270,9 +270,10 @@ augroup vimrc_files
" std::cout << ... << std::endl; shortcut
autocmd Filetype cpp nnoremap <leader>cout istd::cout << << std::endl;<ESC>2F<hi
autocmd Filetype vim setlocal foldmethod=marker " vim fold method to marker
- autocmd FileType haskell set formatprg=stylish-haskell
+ autocmd FileType haskell setlocal formatprg=stylish-haskell
autocmd FileType lisp,html,css,htmldjango setlocal shiftwidth=2
autocmd Filetype markdown nnoremap <leader>r :execute 'silent !pandoc % -o %:r.pdf &' \| redraw! \| echom 'Converting to pdf: ' . expand('%:r') . '.pdf'<CR>
+ autocmd Filetype markdown setlocal textwidth=80
augroup END
" }}}
@@ -335,3 +336,19 @@ nnoremap <leader>ss :setlocal spell!<CR>
hi link juliaFunctionCall Identifier
hi link juliaParDelim Delimiter
+
+nnoremap gf :vsp <cfile><CR>
+
+" from: https://vim.fandom.com/wiki/Autocomplete_with_TAB_when_typing_words
+
+function! TabOrComplete(direction)
+ if col('.') > 1 && strpart(getline('.'), col('.') - 2, 3) =~# '^\w'
+ return a:direction ==# 'next' ? "\<C-n>" : "\<C-p>"
+ else
+ return "\<TAB>"
+ endif
+endfunction
+
+inoremap <TAB> <C-r>=TabOrComplete('next')<CR>
+" st maps Shift-Tab to <ESC>[Z (and it's discouraged to change it)
+inoremap <ESC>[Z <C-r>=TabOrComplete('prev')<CR>
diff --git a/config/x11/xinitrc b/config/x11/xinitrc
index 41c1e93..807c59d 100755
--- a/config/x11/xinitrc
+++ b/config/x11/xinitrc
@@ -12,7 +12,7 @@ unclutter --timeout 10 --fork # hide mouse after 2s
clout push-watch & # could with rsync
case "$(cat /etc/hostname)" in
- cacharle-main)
+ charles-main)
if xrandr | grep 'HDMI-0 connected'
then
xrandr --output DVI-0 --auto --left-of DVI-1 \
diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh
index d190cc7..ede9fda 100644
--- a/config/zsh/aliases.zsh
+++ b/config/zsh/aliases.zsh
@@ -156,5 +156,5 @@ vf() { f="$(fzf || exit 1)" && "$EDITOR" "$f" ; }
alias zathura='zathura --fork'
alias xset-reset='xset r rate 200 50'
-
alias open='xdg-open'
+alias csi='rlwrap chicken-csi'
diff --git a/config/zsh/zprofile b/config/zsh/zprofile
index 880b230..52af55f 100755
--- a/config/zsh/zprofile
+++ b/config/zsh/zprofile
@@ -36,6 +36,7 @@ export GOPATH="$XDG_DATA_HOME/go"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH"
+export RLWRAP_HOME="$XDG_DATA_HOME/rlwrap"
# cache
export HISTFILE="$XDG_CACHE_HOME/zsh/history"
export LESSHISTFILE='-' # no ~/.lesshst