From d98459ae4b1b46e381a62f38f177da22b1406f68 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 26 Jul 2021 07:54:07 +0200 Subject: Added vim autocompletion with Tab and Shift-Tab instead of C-n/C-p --- config/vim/vimrc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'config') diff --git a/config/vim/vimrc b/config/vim/vimrc index 7d2441b..9f5c8fb 100644 --- a/config/vim/vimrc +++ b/config/vim/vimrc @@ -335,3 +335,19 @@ nnoremap ss :setlocal spell! hi link juliaFunctionCall Identifier hi link juliaParDelim Delimiter + +nnoremap gf :vsp + +" 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' ? "\" : "\" + else + return "\" + endif +endfunction + +inoremap =TabOrComplete('next') +" st maps Shift-Tab to [Z (and it's discouraged to change it) +inoremap [Z =TabOrComplete('prev') -- cgit From b0dff6afa640cc540114a8d83486d47ce8282b5a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 28 Jul 2021 14:56:22 +0200 Subject: Updated vimrc markdown to auto wrap line, Changing main machine hostname, Added rlwrap XDG dirs complience, Added qutebrowser deepl search engine --- config/qutebrowser/config.py | 3 +++ config/vim/vimrc | 3 ++- config/x11/xinitrc | 2 +- config/zsh/aliases.zsh | 2 ++ config/zsh/zprofile | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) (limited to 'config') 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 9f5c8fb..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 cout istd::cout << << std::endl;2Fr :execute 'silent !pandoc % -o %:r.pdf &' \| redraw! \| echom 'Converting to pdf: ' . expand('%:r') . '.pdf' + autocmd Filetype markdown setlocal textwidth=80 augroup END " }}} 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 447380b..88285d0 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -156,3 +156,5 @@ vf() { f="$(fzf || exit 1)" && "$EDITOR" "$f" ; } alias zathura='zathura --fork' alias xset-reset='xset r rate 200 50' + +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 -- cgit