From 361b6cd44adf12a9f2f36e4ac00bb373a7a5aae7 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 11 Feb 2020 14:09:38 +0000 Subject: Use master branch for iron --- bin/.local/bin/keyboard | 8 +++--- vim/.vimrc | 66 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index b7f5e90..ee1cc61 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -46,10 +46,10 @@ xmodmap -e "keycode any = space" xcape -e 'Super_L=space' # Make return (Control_R, Return) -xmodmap -e "keysym Return = Control_R" -xmodmap -e "add Control = Control_R" -xmodmap -e "keycode any = Return" -xcape -e 'Control_R=Return' +# xmodmap -e "keysym Return = Control_R" +# xmodmap -e "add Control = Control_R" +# xmodmap -e "keycode any = Return" +# xcape -e 'Control_R=Return' # Make eject an Insert xmodmap -e "keysym XF86Eject = Insert" diff --git a/vim/.vimrc b/vim/.vimrc index b4e5cea..a8bce6a 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -66,9 +66,12 @@ Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' " Plug 'zchee/deoplete-clang' +Plug 'liuchengxu/vim-which-key' + if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' + Plug '~/dotfiles/plugins/darjeeling' endif if has("nvim") @@ -76,7 +79,9 @@ if has("nvim") " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } " Plug 'zchee/deoplete-jedi' - Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } + " Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } + Plug 'hkupty/iron.nvim' + Plug 'neovim/nvim-lsp' else Plug 'Shougo/neocomplete.vim' endif @@ -139,11 +144,29 @@ nnoremap gh :set opfunc=Call_heytmuxg@ xnoremap gh :Heytmux! " Iron +if has("nvim") + let g:iron_map_defaults=0 + let g:iron_map_extended=0 + nmap yr (iron-send-motion) + xmap R (iron-send-motion) + nmap yrr VR + +lua << EOF +local iron = require("iron") + +local open_repl = function(buffer) + vim.api.nvim_command('vnew') +end + +iron.core.set_config{ + preferred = { + python = "ipython" + }, + repl_open_cmd = open_repl +} +EOF " let g:iron_repl_open_cmd = 'vsplit' -let g:iron_map_defaults=0 -nmap yr (iron-send-motion) -xmap R (iron-send-motion) -nmap yrr VR +endif " Easy align xmap ga (EasyAlign) @@ -168,6 +191,7 @@ if &runtimepath =~ 'remembrall' autocmd FileType tex nnoremap ,l Remembrall(',l') augroup END endif +let g:remembrall_suffixes = [""] " LanguageClient if executable('pyls') @@ -196,6 +220,8 @@ let g:neomake_gcc_args=[ \ '-I.', '-I..', '-I../..' \ ] +let g:neomake_python_enabled_makers = ['python', 'pylint'] + " Deoplete let g:deoplete#enable_at_startup = 1 let g:deoplete#sources#jedi#show_docstring = 1 @@ -303,6 +329,7 @@ set foldmethod=marker set hidden set ignorecase set lazyredraw +set laststatus=2 set mouse=a set nojoinspaces set nowrap @@ -576,10 +603,21 @@ function! FloatingFZF() \ } call nvim_open_win(buf, v:true, opts) + call setbufvar(buf, '&laststatus', '2') endfunction -" hi Pmenu ctermfg=3 ctermbg=239 -" let g:remembrall_window = 'call FloatingFZF()' +" highlight default link LspDiagnosticsError Delimiter +" highlight default link LspDiagnosticsWarning Delimiter +" lua << EOF +" require'nvim_lsp'.pyls.setup{} +" EOF + +" Default Values: +" cmd = { "pyls" } +" filetypes = { "python" } +" log_level = 2 +" root_dir = vim's starting directory +" settings = {} " if !exists('g:lsp_config_sourced') " call lsp#add_filetype_config({ @@ -592,6 +630,20 @@ endfunction " let g:lsp_config_sourced = 1 " endif +" lua < Remembrall('') +nnoremap h lua vim.lsp.buf.hover() +nnoremap a lua vim.lsp.buf.declaration() +nnoremap d lua vim.lsp.buf.definition() +nnoremap i lua vim.lsp.buf.implementation() +nnoremap s lua vim.lsp.buf.signature_help() +nnoremap t lua vim.lsp.buf.type_definition() " inoremap :call remembrall#remind('i', '') " nnoremap Remembrall('') -- cgit v1.2.3 From 7e8b21e8bf02f82dbf99c0c2ad2d7f04931a128e Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 22 Nov 2019 12:10:02 +0000 Subject: Change background color of floating window --- vim/.vimrc | 6 +++++- xinit/.xinitrc | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index b1af11e..b4e5cea 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -558,9 +558,10 @@ nnoremap ,e :e **/* let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_layout = { 'window': 'call FloatingFZF()' } +hi Pmenu ctermfg=3 ctermbg=239 function! FloatingFZF() let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&signcolumn', 'no') + call setbufvar(buf, '&laststatus', '1') let height = &lines - 10 let width = float2nr(&columns - (&columns * 2 / 10)) @@ -577,6 +578,9 @@ function! FloatingFZF() call nvim_open_win(buf, v:true, opts) endfunction +" hi Pmenu ctermfg=3 ctermbg=239 +" let g:remembrall_window = 'call FloatingFZF()' + " if !exists('g:lsp_config_sourced') " call lsp#add_filetype_config({ " \ 'filetype': 'python', diff --git a/xinit/.xinitrc b/xinit/.xinitrc index 20b5aee..c779d25 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -17,6 +17,9 @@ feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.jpg xset -dpms xset s off +# Disable bell +xset -b + # SSH agent eval $(ssh-agent) -- cgit v1.2.3 From a0a27a3c403f880a3da52faf496e4bbc3fabe289 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:07:02 +0000 Subject: Add mutt directories --- mutt/.gitignore | 3 +++ mutt/.mail/Misc/.gitkeep | 0 mutt/.mail/Personal/.gitkeep | 0 mutt/.mail/Work/.gitkeep | 0 4 files changed, 3 insertions(+) create mode 100644 mutt/.gitignore create mode 100644 mutt/.mail/Misc/.gitkeep create mode 100644 mutt/.mail/Personal/.gitkeep create mode 100644 mutt/.mail/Work/.gitkeep diff --git a/mutt/.gitignore b/mutt/.gitignore new file mode 100644 index 0000000..f2abc1a --- /dev/null +++ b/mutt/.gitignore @@ -0,0 +1,3 @@ +.mail/Work/* +.mail/Personal/* +.mail/Misc/* diff --git a/mutt/.mail/Misc/.gitkeep b/mutt/.mail/Misc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mutt/.mail/Personal/.gitkeep b/mutt/.mail/Personal/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mutt/.mail/Work/.gitkeep b/mutt/.mail/Work/.gitkeep new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 20e67f471b69f90d48037efd2089cb9aa83a91dc Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:19:22 +0000 Subject: Fix duplicate with mutt --- mutt/.mutt/id_personal | 2 ++ mutt/.mutt/id_work | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mutt/.mutt/id_personal b/mutt/.mutt/id_personal index 8c57cd6..feb81bd 100644 --- a/mutt/.mutt/id_personal +++ b/mutt/.mutt/id_personal @@ -9,3 +9,5 @@ set trash = "+Personal/Personal.bin" macro index,pager gs " $record" macro index,pager gd " $postponed" macro index,pager gb " $trash" + +# vim: ft=muttrc diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work index 238cfcb..c6fea5b 100644 --- a/mutt/.mutt/id_work +++ b/mutt/.mutt/id_work @@ -2,10 +2,14 @@ set from = "u.vaes13@imperial.ac.uk" set sendmail="/usr/bin/msmtp -a imperial" set spoolfile = "+Work/Work" -set record = "+Work/Work.sent" set postponed = "+Work/Work.drafts" set trash = "+Work/Work.bin" +# Record not necessary because outlook saves messages +unset record + macro index,pager gs " $record" macro index,pager gd " $postponed" macro index,pager gb " $trash" + +# vim: ft=muttrc -- cgit v1.2.3 From 8a88e667c2cd1ac5ba333fbcaf355c044860b6df Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:50:53 +0000 Subject: Fix gs mapping --- mutt/.mutt/id_work | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work index c6fea5b..ac75a03 100644 --- a/mutt/.mutt/id_work +++ b/mutt/.mutt/id_work @@ -8,7 +8,7 @@ set trash = "+Work/Work.bin" # Record not necessary because outlook saves messages unset record -macro index,pager gs " $record" +macro index,pager gs " +Work/Work.sent" macro index,pager gd " $postponed" macro index,pager gb " $trash" -- cgit v1.2.3 From c4e82f7325a6ef5b6d1127d16afe2f0b0e3e7c36 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 20:05:57 +0000 Subject: Fix battery script for new laptop --- i3/.config/i3blocks/bin/battery | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/i3/.config/i3blocks/bin/battery b/i3/.config/i3blocks/bin/battery index 378ee3f..0286809 100755 --- a/i3/.config/i3blocks/bin/battery +++ b/i3/.config/i3blocks/bin/battery @@ -5,7 +5,6 @@ if [ ! -d /sys/class/power_supply/BAT0 ]; then exit fi -current_now=$(cat /sys/class/power_supply/BAT0/current_now) charge_now=$(cat /sys/class/power_supply/BAT0/charge_now) charge_full=$(cat /sys/class/power_supply/BAT0/charge_full) bat_status=$(cat /sys/class/power_supply/BAT0/status) @@ -16,7 +15,7 @@ if [ "$bat_status" = "Full" ]; then fi if [ "$bat_status" = "Discharging" ]; then - tot_minutes_remaining=$(( charge_now*60/current_now )) + # tot_minutes_remaining=$(( charge_now*60/current_now )) if [[ $charge_percent -lt 20 ]]; then icon="" @@ -36,14 +35,16 @@ if [ "$bat_status" = "Discharging" ]; then fi elif [ "$bat_status" = "Charging" ]; then - tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) + # current_now=$(cat /sys/class/power_supply/BAT0/current_now) + # tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) icon= color="lightblue" fi -time_remaining=$(printf "%02d:%02d" \ - $(( tot_minutes_remaining/60 )) \ - $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) +# time_remaining=$(printf "%02d:%02d" \ +# $(( tot_minutes_remaining/60 )) \ +# $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) -echo "$icon $charge_percent% ($time_remaining)" +# echo "$icon $charge_percent% ($time_remaining)" +echo "$icon $charge_percent%" -- cgit v1.2.3 From 3c4b0332f59b016ad20f4dee4dea43369b0ab2f8 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 13 Feb 2020 10:32:16 +0000 Subject: Add keys for brightness --- i3/.config/i3/config | 4 +++- xinit/.xinitrc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 28fd656..e51e8ac 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,7 +1,7 @@ # Modifier set $mod Mod4 -font pango:DejaVu Sans Mono, Awesome 8 +font pango:DejaVu Sans Mono, Awesome 9 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -190,6 +190,8 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0% # Display bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 +bindsym Prior exec light -A 10 +bindsym Next exec light -U 10 bindsym Shift+XF86AudioRaiseVolume exec light -A 10 bindsym Shift+XF86AudioLowerVolume exec light -U 10 diff --git a/xinit/.xinitrc b/xinit/.xinitrc index c779d25..4a3c018 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -11,7 +11,7 @@ source $HOME/.local/colors.zsh xrdb $HOME/.Xresources/$COLORSCHEME # Background -feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.jpg +feh --bg-fill /usr/share/backgrounds/Grand_Canyon_North_Rim_by_Rihards_Vilks.jpg # Disable screen going to sleep xset -dpms -- cgit v1.2.3 From 40cedc32101e1d33eca846ffd9add6aeb7745bbd Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 20 Feb 2020 12:51:25 +0000 Subject: Update things --- vim/.vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index a8bce6a..f58f6ee 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -104,7 +104,6 @@ call plug#end() " Toggles nnoremap cpg :GitGutterToggle -nnoremap cpr :IronRepl nnoremap cpn :NERDTreeToggle nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle @@ -147,6 +146,7 @@ xnoremap gh :Heytmux! if has("nvim") let g:iron_map_defaults=0 let g:iron_map_extended=0 + nnoremap cpr :IronRepl nmap yr (iron-send-motion) xmap R (iron-send-motion) nmap yrr VR @@ -273,6 +273,7 @@ let g:vimtex_syntax_enabled=1 " Pilot let g:pilot_boundary='ignore' let g:pilot_mode='wintab' +" let g:pilot_split_or_new='new' " let g:pilot_key_h='' " let g:pilot_key_j='' " let g:pilot_key_k='' -- cgit v1.2.3 From cc688055484c2e17d776c5e7254b33e3f4d7816d Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 25 Feb 2020 10:32:10 +0000 Subject: Update iron configuration --- vim/.vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vim/.vimrc b/vim/.vimrc index f58f6ee..4a3d951 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -149,6 +149,7 @@ if has("nvim") nnoremap cpr :IronRepl nmap yr (iron-send-motion) xmap R (iron-send-motion) + nmap yp (iron-repeat-cmd) nmap yrr VR lua << EOF @@ -437,6 +438,7 @@ nnoremap ,cl :set background=light:colorscheme solarized nnoremap ,cl :set background=dark:colorscheme solarized nnoremap ,cs :colorscheme seoul256 nnoremap ,cn :colorscheme nord +set notermguicolors colo seoul256 "" Autocommands {{{1 -- cgit v1.2.3 From fcac7f830ce833ad74298a88a07c77aad9277fb6 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 11:13:02 +0000 Subject: Minor changes --- Xresources/.Xresources/base | 2 +- vim/.vim/spell/en.utf-8.add | 1 + zsh/.zshrc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base index b9ff079..ea87784 100644 --- a/Xresources/.Xresources/base +++ b/Xresources/.Xresources/base @@ -28,7 +28,7 @@ URxvt.resize-font.bigger: C-plus ! Appearance /* URxvt*font: xft:DejaVu Sans Mono:size=12 */ -URxvt*font: xft:monaco:size=11.5 +URxvt*font: xft:monaco:size=12 URxvt*scrollBar: false URxvt*internalBorder: 0 URxvt.fading: 35 diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 999f578..ddbe70a 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -61,3 +61,4 @@ unitarily multimodal Kalman i.e. +Stratonovich diff --git a/zsh/.zshrc b/zsh/.zshrc index cc2e1ad..e54be1c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -172,9 +172,9 @@ alias mca='make clean-all' # Misc alias a='vifm . .' -alias ff='FreeFem++' alias m='cd ~/.mutt/attachments && mutt && cd -' alias e='nvim' +alias f='fzm' alias mux='tmuxinator' alias email='mbsync -a' alias renet='systemctl restart NetworkManager.service' -- cgit v1.2.3 From ebe9521c37b97959df974f8adeb4c7bfed0a527a Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 12:23:18 +0000 Subject: Fix i3 script --- bin/.local/bin/workspace | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index ad378ef..4f2ab67 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# List of workspaces +# List of workspaces: (id, number, name) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; - FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")" + FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $2, $4, $8, $11 + print $4, $6 + }' | sort) act_on_container() { -- cgit v1.2.3 From 981d8a9f49dea9c6435c97b6948c50995ad40258 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 3 Mar 2020 22:20:58 +0000 Subject: Fix workspace script --- bin/.local/bin/workspace | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index 4f2ab67..b3fdfaa 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# List of workspaces: (id, number, name) +# List of workspaces: ( number, name, focused) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $4, $6 + print $4, $6, $10 }' | sort) -- cgit v1.2.3 From 81bc19fb3952846ef08345617bc120cdc6d31d72 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 18 Mar 2020 15:55:57 +0000 Subject: Change default browser --- qutebrowser/.config/qutebrowser/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index f4acf32..aa447b9 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -50,7 +50,7 @@ config.bind('', 'completion-item-focus next', mode='command') # Search engines c.url.searchengines = { - 'DEFAULT': 'https://startpage.com/do/search?query={}', + 'DEFAULT': 'https://www.ecosia.org/search?q={}', 'amazon': 'https://www.amazon.co.uk/s?k={}', 'aw': 'https://wiki.archlinux.org/index.php?search={}', 'ddg': 'https://duckduckgo.com/?q={}', -- cgit v1.2.3 From e4c281b9c3d8cd25bd71667540b3a1046fcb862f Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 27 Mar 2020 19:50:45 +0100 Subject: Update plugins --- .mrconfig | 7 ++++++- vim/.vimrc | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.mrconfig b/.mrconfig index 066521d..4a71cb3 100644 --- a/.mrconfig +++ b/.mrconfig @@ -11,4 +11,9 @@ push = git push origin master [$HOME/dotfiles/plugins/vim-tmux-pilot] checkout = git clone 'git@github.com:urbainvaes/vim-tmux-pilot.git' update = git pull origin master -push = git saveandsync +push = git push origin master + +[$HOME/dotfiles/plugins/vim-ripple] +checkout = git clone 'git@github.com:urbainvaes/vim-ripple.git' +update = git pull origin master +push = git push origin master diff --git a/vim/.vimrc b/vim/.vimrc index 4a3d951..f4d0796 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -66,8 +66,6 @@ Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' " Plug 'zchee/deoplete-clang' -Plug 'liuchengxu/vim-which-key' - if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' @@ -656,3 +654,48 @@ nnoremap t lua vim.lsp.buf.type_definition() " nnoremap i :call lsp#text_document_implementation() " nnoremap s :call lsp#text_document_signature_help() " nnoremap t :call lsp#text_document_type_definition() + +" https://stackoverflow.com/questions/1533565/how-to-get-visually-selected-text-in-vimscript +function! GetSelection(m1, m2) + let lines = getline(line_start, line_end) + " if len(lines) == 0 + " return '' + " endif + " echom len(lines) + " echom line_start column_start line_end column_end + " echom lines[-1] + return join(lines, "\n") +endfunction + +function! Send_motion_or_selection(...) + let is_visual = (a:1 == "v" || a:1 == "V") + let char_wise = (a:1 == "char" || a:1 == "v") + let m1 = is_visual ? "'<" : "'[" + let m2 = is_visual ? "'>" : "']" + + let [line_start, column_start] = getpos(l:m1)[1:2] + let [line_end, column_end] = getpos(l:m2)[1:2] + let lines = getline(line_start, line_end) + if char_wise + let lines[0] = lines[0][column_start - 1:] + let offset = (&selection == 'inclusive' ? 1 : 2) + let lines[-1] = lines[-1][:column_end - offset] + endif + + noautocmd buffer term + norm G$ + set paste + let open_bracketed_paste = "\[200~" + let close_bracketed_paste = "\[201~" + let newline = "\" + put =open_bracketed_paste + let code = join(lines, "\n") + put =code + put =close_bracketed_paste + put =newline + set nopaste + buffer # +endfunction + +nnoremap yr :set opfunc=Send_motion_or_selectiong@ +xnoremap R :call Send_motion_or_selection(visualmode()) -- cgit v1.2.3 From 72c51052ac3b9bd9275b3710f543fe5da4ecbeca Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sun, 29 Mar 2020 11:40:47 +0200 Subject: Replace iron.nvim by vim-ripple --- vim/.vimrc | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index f4d0796..d8ca6e9 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -69,7 +69,7 @@ Plug 'wellle/targets.vim' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' - Plug '~/dotfiles/plugins/darjeeling' + Plug '~/dotfiles/plugins/vim-ripple' endif if has("nvim") @@ -77,8 +77,6 @@ if has("nvim") " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } " Plug 'zchee/deoplete-jedi' - " Plug 'hkupty/iron.nvim', { 'branch': 'legacy' } - Plug 'hkupty/iron.nvim' Plug 'neovim/nvim-lsp' else Plug 'Shougo/neocomplete.vim' @@ -140,33 +138,6 @@ endfunction nnoremap gh :set opfunc=Call_heytmuxg@ xnoremap gh :Heytmux! -" Iron -if has("nvim") - let g:iron_map_defaults=0 - let g:iron_map_extended=0 - nnoremap cpr :IronRepl - nmap yr (iron-send-motion) - xmap R (iron-send-motion) - nmap yp (iron-repeat-cmd) - nmap yrr VR - -lua << EOF -local iron = require("iron") - -local open_repl = function(buffer) - vim.api.nvim_command('vnew') -end - -iron.core.set_config{ - preferred = { - python = "ipython" - }, - repl_open_cmd = open_repl -} -EOF -" let g:iron_repl_open_cmd = 'vsplit' -endif - " Easy align xmap ga (EasyAlign) nmap ga (EasyAlign) -- cgit v1.2.3 From af174aee615ad634cd457ee1c842d4aa89f3a59c Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 7 Apr 2020 12:18:21 +0200 Subject: Improve vim syntax for colors --- .mrconfig | 5 +++++ bin/.local/bin/workspace | 1 - vifm/.config/vifm/vifmrc | 2 +- vim/.vim/after/syntax/vim.vim | 25 +++++++++++++++++++++++++ vim/.vimrc | 42 ++---------------------------------------- 5 files changed, 33 insertions(+), 42 deletions(-) create mode 100644 vim/.vim/after/syntax/vim.vim diff --git a/.mrconfig b/.mrconfig index 4a71cb3..437d1d6 100644 --- a/.mrconfig +++ b/.mrconfig @@ -17,3 +17,8 @@ push = git push origin master checkout = git clone 'git@github.com:urbainvaes/vim-ripple.git' update = git pull origin master push = git push origin master + +[$HOME/dotfiles/plugins/vim-darjeeling] +checkout = git clone 'git@github.com:urbainvaes/vim-darjeeling.git' +update = git pull origin master +push = git push origin master diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index b3fdfaa..36f09d4 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -8,7 +8,6 @@ workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { $0 !~ "^\\s*$" { gsub(/"/, "", $4) print $4, $6, $10 - }' | sort) act_on_container() { diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 7a73409..68f6be2 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -1,6 +1,6 @@ " Command to open files filetype *.JPG feh %f & -filetype *.exe wine %f & +filetype *.exe wine %f & filetype * xdg-open %f & " Options diff --git a/vim/.vim/after/syntax/vim.vim b/vim/.vim/after/syntax/vim.vim new file mode 100644 index 0000000..f6b389e --- /dev/null +++ b/vim/.vim/after/syntax/vim.vim @@ -0,0 +1,25 @@ +" Modification of default rule: vimHiCtermFg,vimHiCtermBg instead of vimHiCtermFgBg +syntax cluster vimHiCluster remove=vimHiCtermFgBg +syntax cluster vimHiCluster add=vimHiCtermFg,vimHiCtermBg + +" Modification of default rule: @vimHiNmbrFgCluster,@vimHiNmbrBgCluster instead of vimHiNmbr +syntax match vimHiCtermFg /\cctermfg=/ contained nextgroup=@vimHiNmbrFgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError +syntax match vimHiCtermBg /\cctermbg=/ contained nextgroup=@vimHiNmbrBgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError + +" Assemble syntax groups +let syntax_groups_fg = "vimHiNmbrFg1" +let syntax_groups_bg = "vimHiNmbrBg1" +for i in range(2, 255) + let syntax_groups_fg = syntax_groups_fg.",vimHiNmbrFg".i + let syntax_groups_bg = syntax_groups_bg.",vimHiNmbrBg".i +endfor + +exe "syntax cluster vimHiNmbrFgCluster contains=".syntax_groups_fg +exe "syntax cluster vimHiNmbrBgCluster contains=".syntax_groups_bg + +for i in range(1, 255) + exe "syntax match vimHiNmbrFg".i." /".i."/ contained" + exe "syntax match vimHiNmbrBg".i." /".i."/ contained" + exe "highlight vimHiNmbrFg".i." ctermfg=".i + exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i +endfor diff --git a/vim/.vimrc b/vim/.vimrc index d8ca6e9..f4751a3 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -11,17 +11,12 @@ let maplocalleader = "," "" Plugins {{{1 call plug#begin('~/.vim/plugged') -Plug 'LnL7/vim-nix' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'SirVer/ultisnips' Plug 'airblade/vim-gitgutter' Plug 'AndrewRadev/splitjoin.vim' -Plug 'beloglazov/vim-online-thesaurus' Plug 'easymotion/vim-easymotion' -Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' -Plug 'inkarkat/vim-SpellCheck' -Plug 'inkarkat/vim-ingo-library' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -43,7 +38,6 @@ Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' -Plug 'ton/vim-bufsurf' Plug 'tpope/vim-abolish' Plug 'tpope/vim-apathy' Plug 'tpope/vim-commentary' @@ -64,36 +58,23 @@ let g:zoomwintab_hidetabbar=0 Plug 'vim-scripts/ReplaceWithRegister' Plug 'vim-scripts/gmsh.vim' Plug 'wellle/targets.vim' -" Plug 'zchee/deoplete-clang' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' + Plug '~/dotfiles/plugins/vim-darjeeling' Plug '~/dotfiles/plugins/vim-ripple' endif if has("nvim") - " Plug 'roxma/nvim-completion-manager' - " Plug 'Shougo/deoplete.nvim', { 'do' : ':UpdateRemotePlugins', 'tag' : '4.1' } - " Plug 'autozimu/LanguageClient-neovim', { 'do': 'bash install.sh', 'branch': 'next' } - " Plug 'zchee/deoplete-jedi' Plug 'neovim/nvim-lsp' -else - Plug 'Shougo/neocomplete.vim' endif " Colors -Plug 'KKPMW/sacredforest-vim' Plug 'altercation/vim-colors-solarized' -Plug 'arcticicestudio/nord-vim' -Plug 'KKPMW/moonshine-vim' Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' -Plug 'joshdick/onedark.vim' -" Plug 'josuegaleas/jay' - -" Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() "" Plugin configuration {{{1 @@ -555,28 +536,9 @@ set wildcharm= nnoremap ,e :e **/* let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': 'call FloatingFZF()' } +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } hi Pmenu ctermfg=3 ctermbg=239 -function! FloatingFZF() - let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&laststatus', '1') - - let height = &lines - 10 - let width = float2nr(&columns - (&columns * 2 / 10)) - let col = float2nr((&columns - width) / 2) - - let opts = { - \ 'relative': 'editor', - \ 'row': 5, - \ 'col': col, - \ 'width': width, - \ 'height': height - \ } - - call nvim_open_win(buf, v:true, opts) - call setbufvar(buf, '&laststatus', '2') -endfunction " highlight default link LspDiagnosticsError Delimiter " highlight default link LspDiagnosticsWarning Delimiter -- cgit v1.2.3 From 4096ea1373b31fffc81523a361e555d11d7251fd Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 7 Apr 2020 12:19:33 +0200 Subject: Move function to plugin --- vim/.vimrc | 64 ++++++++++++-------------------------------------------------- 1 file changed, 12 insertions(+), 52 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index f4751a3..443a14d 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -579,56 +579,16 @@ nnoremap i lua vim.lsp.buf.implementation() nnoremap s lua vim.lsp.buf.signature_help() nnoremap t lua vim.lsp.buf.type_definition() -" inoremap :call remembrall#remind('i', '') -" nnoremap Remembrall('') -" nnoremap h :call lsp#text_document_hover() -" nnoremap a :call lsp#text_document_declaration() -" nnoremap d :call lsp#text_document_definition() -" nnoremap i :call lsp#text_document_implementation() -" nnoremap s :call lsp#text_document_signature_help() -" nnoremap t :call lsp#text_document_type_definition() - -" https://stackoverflow.com/questions/1533565/how-to-get-visually-selected-text-in-vimscript -function! GetSelection(m1, m2) - let lines = getline(line_start, line_end) - " if len(lines) == 0 - " return '' - " endif - " echom len(lines) - " echom line_start column_start line_end column_end - " echom lines[-1] - return join(lines, "\n") -endfunction - -function! Send_motion_or_selection(...) - let is_visual = (a:1 == "v" || a:1 == "V") - let char_wise = (a:1 == "char" || a:1 == "v") - let m1 = is_visual ? "'<" : "'[" - let m2 = is_visual ? "'>" : "']" - - let [line_start, column_start] = getpos(l:m1)[1:2] - let [line_end, column_end] = getpos(l:m2)[1:2] - let lines = getline(line_start, line_end) - if char_wise - let lines[0] = lines[0][column_start - 1:] - let offset = (&selection == 'inclusive' ? 1 : 2) - let lines[-1] = lines[-1][:column_end - offset] - endif - - noautocmd buffer term - norm G$ - set paste - let open_bracketed_paste = "\[200~" - let close_bracketed_paste = "\[201~" - let newline = "\" - put =open_bracketed_paste - let code = join(lines, "\n") - put =code - put =close_bracketed_paste - put =newline - set nopaste - buffer # -endfunction -nnoremap yr :set opfunc=Send_motion_or_selectiong@ -xnoremap R :call Send_motion_or_selection(visualmode()) +" function! Autocomplete() +" let [l, c] = [getline("."), col(".")] +" if l[c-5:c-2] == "cite" || l[c-4:c-2] == "ref" +" return "{\\" +" endif +" return "{" +" endfunction + +" augroup autocompletion +" autocmd! +" autocmd FileType tex inoremap { Autocomplete() +" augroup END -- cgit v1.2.3 From dc6a4bfb76eb92519c3d17d790055a546cdb9df5 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 7 Apr 2020 13:13:35 +0200 Subject: Add autocommand to reload colors --- vim/.vim/after/colors/colors.vim | 4 ++++ vim/.vim/after/syntax/vim.vim | 4 ++-- vim/.vimrc | 20 +++++++++++--------- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 vim/.vim/after/colors/colors.vim diff --git a/vim/.vim/after/colors/colors.vim b/vim/.vim/after/colors/colors.vim new file mode 100644 index 0000000..7c8c10a --- /dev/null +++ b/vim/.vim/after/colors/colors.vim @@ -0,0 +1,4 @@ +for i in range(1, 255) + exe "highlight vimHiNmbrFg".i." ctermfg=".i + exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i +endfor diff --git a/vim/.vim/after/syntax/vim.vim b/vim/.vim/after/syntax/vim.vim index f6b389e..78e8d37 100644 --- a/vim/.vim/after/syntax/vim.vim +++ b/vim/.vim/after/syntax/vim.vim @@ -5,6 +5,8 @@ syntax cluster vimHiCluster add=vimHiCtermFg,vimHiCtermBg " Modification of default rule: @vimHiNmbrFgCluster,@vimHiNmbrBgCluster instead of vimHiNmbr syntax match vimHiCtermFg /\cctermfg=/ contained nextgroup=@vimHiNmbrFgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError syntax match vimHiCtermBg /\cctermbg=/ contained nextgroup=@vimHiNmbrBgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError +hi def link vimHiCtermFg vimHiCtermFgBg +hi def link vimHiCtermBg vimHiCtermFgBg " Assemble syntax groups let syntax_groups_fg = "vimHiNmbrFg1" @@ -20,6 +22,4 @@ exe "syntax cluster vimHiNmbrBgCluster contains=".syntax_groups_bg for i in range(1, 255) exe "syntax match vimHiNmbrFg".i." /".i."/ contained" exe "syntax match vimHiNmbrBg".i." /".i."/ contained" - exe "highlight vimHiNmbrFg".i." ctermfg=".i - exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i endfor diff --git a/vim/.vimrc b/vim/.vimrc index 443a14d..16a8d73 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -382,18 +382,11 @@ nnoremap ,e :E " Unimpaired nmap co yo -"" Colorscheme {{{1 -nnoremap ,c :colorscheme -nnoremap ,cl :set background=light:colorscheme solarized -nnoremap ,cl :set background=dark:colorscheme solarized -nnoremap ,cs :colorscheme seoul256 -nnoremap ,cn :colorscheme nord -set notermguicolors -colo seoul256 - "" Autocommands {{{1 augroup vimrc autocmd! + autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim + autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 autocmd BufWritePre * @@ -423,6 +416,15 @@ augroup vimrc autocmd FileType dirvish silent! unmap augroup END +"" Colorscheme {{{1 +nnoremap ,c :colorscheme +nnoremap ,cl :set background=light:colorscheme solarized +nnoremap ,cl :set background=dark:colorscheme solarized +nnoremap ,cs :colorscheme seoul256 +nnoremap ,cn :colorscheme nord +set notermguicolors +colo seoul256 + "" My search {{{1 " http://vim.wikia.com/wiki/Searching_for_files -- cgit v1.2.3 From 1653d28086c07998be4e30e1d3857cb85e59aa0f Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 11 Apr 2020 19:37:11 +0200 Subject: Move auxiliary functions to plugin --- .mrconfig | 5 +++++ vim/.vim/after/colors/colors.vim | 4 ---- vim/.vim/after/syntax/vim.vim | 25 ------------------------ vim/.vimrc | 42 ++++++++-------------------------------- 4 files changed, 13 insertions(+), 63 deletions(-) delete mode 100644 vim/.vim/after/colors/colors.vim delete mode 100644 vim/.vim/after/syntax/vim.vim diff --git a/.mrconfig b/.mrconfig index 437d1d6..4152e60 100644 --- a/.mrconfig +++ b/.mrconfig @@ -22,3 +22,8 @@ push = git push origin master checkout = git clone 'git@github.com:urbainvaes/vim-darjeeling.git' update = git pull origin master push = git push origin master + +[$HOME/dotfiles/plugins/vim-macaw] +checkout = git clone 'git@github.com:urbainvaes/vim-macaw.git' +update = git pull origin master +push = git push origin master diff --git a/vim/.vim/after/colors/colors.vim b/vim/.vim/after/colors/colors.vim deleted file mode 100644 index 7c8c10a..0000000 --- a/vim/.vim/after/colors/colors.vim +++ /dev/null @@ -1,4 +0,0 @@ -for i in range(1, 255) - exe "highlight vimHiNmbrFg".i." ctermfg=".i - exe "highlight vimHiNmbrBg".i." ctermfg=black ctermbg=".i -endfor diff --git a/vim/.vim/after/syntax/vim.vim b/vim/.vim/after/syntax/vim.vim deleted file mode 100644 index 78e8d37..0000000 --- a/vim/.vim/after/syntax/vim.vim +++ /dev/null @@ -1,25 +0,0 @@ -" Modification of default rule: vimHiCtermFg,vimHiCtermBg instead of vimHiCtermFgBg -syntax cluster vimHiCluster remove=vimHiCtermFgBg -syntax cluster vimHiCluster add=vimHiCtermFg,vimHiCtermBg - -" Modification of default rule: @vimHiNmbrFgCluster,@vimHiNmbrBgCluster instead of vimHiNmbr -syntax match vimHiCtermFg /\cctermfg=/ contained nextgroup=@vimHiNmbrFgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError -syntax match vimHiCtermBg /\cctermbg=/ contained nextgroup=@vimHiNmbrBgCluster,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError -hi def link vimHiCtermFg vimHiCtermFgBg -hi def link vimHiCtermBg vimHiCtermFgBg - -" Assemble syntax groups -let syntax_groups_fg = "vimHiNmbrFg1" -let syntax_groups_bg = "vimHiNmbrBg1" -for i in range(2, 255) - let syntax_groups_fg = syntax_groups_fg.",vimHiNmbrFg".i - let syntax_groups_bg = syntax_groups_bg.",vimHiNmbrBg".i -endfor - -exe "syntax cluster vimHiNmbrFgCluster contains=".syntax_groups_fg -exe "syntax cluster vimHiNmbrBgCluster contains=".syntax_groups_bg - -for i in range(1, 255) - exe "syntax match vimHiNmbrFg".i." /".i."/ contained" - exe "syntax match vimHiNmbrBg".i." /".i."/ contained" -endfor diff --git a/vim/.vimrc b/vim/.vimrc index 16a8d73..896c07d 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -62,8 +62,9 @@ Plug 'wellle/targets.vim' if isdirectory($HOME."/dotfiles/plugins") Plug '~/dotfiles/plugins/vim-remembrall' Plug '~/dotfiles/plugins/vim-tmux-pilot' - Plug '~/dotfiles/plugins/vim-darjeeling' Plug '~/dotfiles/plugins/vim-ripple' + Plug '~/dotfiles/plugins/vim-darjeeling' + Plug '~/dotfiles/plugins/vim-macaw' endif if has("nvim") @@ -271,7 +272,7 @@ set undodir^=~/.vim/undo// " ^= : prepends to list " // : store absolute path -set complete+=k +" set complete+=k set conceallevel=2 set cursorline set diffopt=filler,vertical,hiddenoff @@ -283,6 +284,7 @@ set ignorecase set lazyredraw set laststatus=2 set mouse=a +" set noequalalways set nojoinspaces set nowrap set path+=$PWD/** @@ -384,8 +386,8 @@ nmap co yo "" Autocommands {{{1 augroup vimrc - autocmd! - autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim + " autocmd! + " autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 @@ -417,13 +419,10 @@ augroup vimrc augroup END "" Colorscheme {{{1 -nnoremap ,c :colorscheme -nnoremap ,cl :set background=light:colorscheme solarized -nnoremap ,cl :set background=dark:colorscheme solarized +nnoremap ,cd :colorscheme darjeeling nnoremap ,cs :colorscheme seoul256 -nnoremap ,cn :colorscheme nord set notermguicolors -colo seoul256 +colo darjeeling "" My search {{{1 @@ -555,17 +554,6 @@ hi Pmenu ctermfg=3 ctermbg=239 " root_dir = vim's starting directory " settings = {} -" if !exists('g:lsp_config_sourced') -" call lsp#add_filetype_config({ -" \ 'filetype': 'python', -" \ 'name': 'pyls', -" \ 'cmd': 'pyls', -" \ 'callbacks': {} -" \ }) -" autocmd Filetype python setl omnifunc=lsp#omnifunc -" let g:lsp_config_sourced = 1 -" endif - " lua < d lua vim.lsp.buf.definition() nnoremap i lua vim.lsp.buf.implementation() nnoremap s lua vim.lsp.buf.signature_help() nnoremap t lua vim.lsp.buf.type_definition() - - -" function! Autocomplete() -" let [l, c] = [getline("."), col(".")] -" if l[c-5:c-2] == "cite" || l[c-4:c-2] == "ref" -" return "{\\" -" endif -" return "{" -" endfunction - -" augroup autocompletion -" autocmd! -" autocmd FileType tex inoremap { Autocomplete() -" augroup END -- cgit v1.2.3 From 40f469c17357e8185f325aa94a6e90a8a79ff095 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 14 Apr 2020 14:40:55 +0200 Subject: Clean up vimrc --- vifm/.config/vifm/vifmrc | 1 + vim/.vim/spell/en.utf-8.add | 3 ++ vim/.vim/spell/en.utf-8.add.spl | Bin 995 -> 1045 bytes vim/.vimrc | 93 ++-------------------------------------- 4 files changed, 7 insertions(+), 90 deletions(-) diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index 68f6be2..d7219ed 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -6,6 +6,7 @@ filetype * xdg-open %f & " Options set fastrun set history=100 +set ignorecase set incsearch set sortnumbers set scrolloff=2 diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index ddbe70a..04039f6 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -62,3 +62,6 @@ multimodal Kalman i.e. Stratonovich +colorscheme +colorscheme +plugin diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl index e9828ae..bfb7b60 100644 Binary files a/vim/.vim/spell/en.utf-8.add.spl and b/vim/.vim/spell/en.utf-8.add.spl differ diff --git a/vim/.vimrc b/vim/.vimrc index 896c07d..1a07c9c 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,4 +1,5 @@ "" Download vim-plug if necessary {{{1 + if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim @@ -33,7 +34,6 @@ Plug 'lervag/vimtex' Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' Plug 'neomake/neomake' -Plug 'scrooloose/nerdtree' Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' @@ -126,9 +126,6 @@ nmap ga (EasyAlign) xmap gl (LiveEasyAlign) nmap gl (LiveEasyAlign) -" Online thesaurus -nnoremap cpd :OnlineThesaurusCurrentWord - " Plug nnoremap ,pi :PlugInstall nnoremap ,pu :PlugUpdate @@ -145,16 +142,6 @@ if &runtimepath =~ 'remembrall' endif let g:remembrall_suffixes = [""] -" LanguageClient -if executable('pyls') - let g:LanguageClient_serverCommands = { 'python': ['pyls'], } -endif - -let g:LanguageClient_diagnosticsEnable = 0 -nnoremap lh :call LanguageClient#textDocument_hover() -nnoremap ld :call LanguageClient#textDocument_definition() -nnoremap lr :call LanguageClient#textDocument_rename() - " Ultisnips nnoremap cps :UltiSnipsEdit @@ -174,30 +161,12 @@ let g:neomake_gcc_args=[ let g:neomake_python_enabled_makers = ['python', 'pylint'] -" Deoplete -let g:deoplete#enable_at_startup = 1 -let g:deoplete#sources#jedi#show_docstring = 1 -if !exists('g:deoplete#omni#input_patterns') - let g:deoplete#omni#input_patterns = {} -endif - -if &runtimepath =~ 'vimtex' - let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete -endif - " FZF.vim let g:fzf_buffers_jump = 1 " Gundo let g:gundo_prefer_python3 = 1 -" Localvimrc -let g:localvimrc_sandbox = 0 -let g:localvimrc_whitelist='/home/*' - -" NerdTree -let g:NERDTreeHijackNetrw = 0 - " Ultisnips let g:UltiSnipsEditSplit="horizontal" let g:UltiSnipsExpandTrigger="" @@ -232,32 +201,6 @@ let g:pilot_mode='wintab' " let g:pilot_key_l='' " let g:pilot_key_p='' -" YouCompleteMe -let g:ycm_key_list_select_completion = ['', ''] -let g:ycm_key_list_previous_completion = ['', ''] -let g:ycm_add_preview_to_completeopt = 0 -let g:ycm_confirm_extra_conf = 0 -let g:ycm_auto_trigger = 1 -if !exists('g:ycm_semantic_triggers') - let g:ycm_semantic_triggers = {} - let g:ycm_semantic_triggers.tex = ['re!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' ] -endif - -" Plugins interactions -function! Multiple_cursors_before() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 1 - call deoplete#disable() - endif -endfunction - -function! Multiple_cursors_after() - if has("nvim") && &runtimepath =~ 'deoplete' - let b:deoplete_disable_auto_complete = 0 - call deoplete#enable() - endif -endfunction - "" Vim variables {{{1 let g:netrw_bufsettings='relativenumber' let g:tex_conceal= '' @@ -358,12 +301,6 @@ cnoremap cnoremap cnoremap -" Overwrite unimpaired mappings -nnoremap -nnoremap >b :BufSurfForward -nnoremap :bd! # -nnoremap >B :BufSurfForward:bd! # - " Alternate file nnoremap  nnoremap + :Buffers @@ -386,9 +323,8 @@ nmap co yo "" Autocommands {{{1 augroup vimrc - " autocmd! - " autocmd ColorScheme * source $HOME/dotfiles/vim/.vim/after/colors/colors.vim - + autocmd! + autocmd ColorScheme * highlight String ctermfg=192 guifg=#d7ff87 autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 autocmd BufWritePre * @@ -534,32 +470,9 @@ endif "" Experimental {{{1 set wildcharm= -nnoremap ,e :e **/* - let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } -hi Pmenu ctermfg=3 ctermbg=239 - -" highlight default link LspDiagnosticsError Delimiter -" highlight default link LspDiagnosticsWarning Delimiter -" lua << EOF -" require'nvim_lsp'.pyls.setup{} -" EOF - -" Default Values: -" cmd = { "pyls" } -" filetypes = { "python" } -" log_level = 2 -" root_dir = vim's starting directory -" settings = {} - -" lua < Remembrall('') nnoremap h lua vim.lsp.buf.hover() -- cgit v1.2.3 From f63f95f7c7ce0444b1b442951ad96cf908ac5058 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Mon, 27 Apr 2020 09:43:04 +0200 Subject: Update configuration --- git/.git_template/hooks/ctags | 5 ++--- vim/.config/nvim/view | 1 - vim/.vimrc | 35 +++++++++++++++++++++++++---------- 3 files changed, 27 insertions(+), 14 deletions(-) delete mode 120000 vim/.config/nvim/view diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags index a52759d..fe27a19 100755 --- a/git/.git_template/hooks/ctags +++ b/git/.git_template/hooks/ctags @@ -1,7 +1,6 @@ #!/bin/sh set -e PATH="/usr/local/bin:$PATH" -dir="$(git rev-parse --git-dir)" trap 'rm -f "$dir/$$.tags"' EXIT -git ls-files | ctags --tag-relative=yes -L - -f"$dir/$$.tags" --languages=-javascript,sql -mv "$dir/$$.tags" "$dir/tags" +git ls-files | ctags --tag-relative=yes -L - -f"$$.tags" --languages=-javascript,sql +mv "$$.tags" "tags" diff --git a/vim/.config/nvim/view b/vim/.config/nvim/view deleted file mode 120000 index fcd4091..0000000 --- a/vim/.config/nvim/view +++ /dev/null @@ -1 +0,0 @@ -../../../../.vim/view \ No newline at end of file diff --git a/vim/.vimrc b/vim/.vimrc index 1a07c9c..44bf4db 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,5 +1,4 @@ "" Download vim-plug if necessary {{{1 - if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim @@ -33,9 +32,10 @@ Plug 'kshenoy/vim-signature' Plug 'lervag/vimtex' Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' +Plug 'mg979/vim-visual-multi' Plug 'neomake/neomake' Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -Plug 'terryma/vim-multiple-cursors' +" Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' Plug 'tpope/vim-abolish' @@ -76,6 +76,7 @@ Plug 'altercation/vim-colors-solarized' Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' +Plug 'arcticicestudio/nord-vim' call plug#end() "" Plugin configuration {{{1 @@ -87,9 +88,6 @@ nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle nnoremap cp Remembrall('cp') -" Easy motion -map gs (easymotion-prefix) - " Fuzzy finder nnoremap a :Ag nnoremap b :Buffers @@ -112,6 +110,11 @@ nnoremap gc :Gcommit nnoremap gr :Gread nnoremap gd :Gdiff +" Multiple cursors +let g:VM_maps = {} +let g:VM_maps["Select Cursor Down"] = "" +let g:VM_maps["Select Cursor Up"] = "" + " Heytmux function! Call_heytmux(vm) call feedkeys(":'[,']Heytmux! ") @@ -162,7 +165,9 @@ let g:neomake_gcc_args=[ let g:neomake_python_enabled_makers = ['python', 'pylint'] " FZF.vim +let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_buffers_jump = 1 +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } " Gundo let g:gundo_prefer_python3 = 1 @@ -226,6 +231,8 @@ set hidden set ignorecase set lazyredraw set laststatus=2 +set listchars+=eol:$ +set wildcharm= set mouse=a " set noequalalways set nojoinspaces @@ -255,6 +262,8 @@ endif nnoremap 1 m`yypVr=`` nnoremap 2 m`yypVr-`` +nnoremap m :.m + nnoremap n nzz nnoremap N Nzz @@ -324,7 +333,8 @@ nmap co yo "" Autocommands {{{1 augroup vimrc autocmd! - autocmd ColorScheme * highlight String ctermfg=192 guifg=#d7ff87 + " autocmd ColorScheme * highlight String ctermfg=192 guifg=#d7ff87 + " autocmd ColorScheme * highlight Folded ctermbg=23 ctermfg=185 guibg=#005f5f guifg=#d7d75f autocmd BufWritePost *vimrc,*exrc :call feedkeys(":source %\") autocmd BufNewFile,Bufread /tmp/mutt-* setlocal tw=72 autocmd BufWritePre * @@ -469,10 +479,6 @@ if has("nvim") endif "" Experimental {{{1 -set wildcharm= -let $FZF_DEFAULT_OPTS='--layout=reverse' -let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } - autocmd Filetype python setl omnifunc=v:lua.vim.lsp.omnifunc nnoremap Remembrall('') nnoremap h lua vim.lsp.buf.hover() @@ -481,3 +487,12 @@ nnoremap d lua vim.lsp.buf.definition() nnoremap i lua vim.lsp.buf.implementation() nnoremap s lua vim.lsp.buf.signature_help() nnoremap t lua vim.lsp.buf.type_definition() + +" highlight LineNr ctermbg=159 ctermfg=27 guibg=#afffff guifg=#005fff +" highlight StatusLineNC ctermbg=22 ctermfg=121 guibg=#005f00 guifg=#87ffaf +" highlight Comment ctermbg=159 ctermfg=195 guibg=#afffff guifg=#d7ffff +" highlight Normal ctermbg=195 ctermfg=237 guibg=#d7ffff guifg=#3a3a3a +" highlight Special ctermfg=96 guifg=#875f87 +" highlight StatusLine ctermbg=131 ctermfg=223 guibg=#af5f5f guifg=#ffd7af +" highlight Statement ctermfg=65 guifg=#5f875f +" highlight Type ctermfg=254 guifg=#e4e4e4 -- cgit v1.2.3 From e59f7de19940b3b2740be7464f97902fe6ef7179 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 17 Jun 2020 11:32:14 +0200 Subject: Minor changes --- .gitignore | 1 + vifm/.config/vifm/vifmrc | 1 + vim/.vim/spell/en.utf-8.add | 2 ++ vim/.vim/spell/en.utf-8.add.spl | Bin 1045 -> 1067 bytes vim/.vimrc | 10 +++++++--- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 475bc4d..810bcb2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ plugins/* +tags diff --git a/vifm/.config/vifm/vifmrc b/vifm/.config/vifm/vifmrc index d7219ed..0dd5220 100644 --- a/vifm/.config/vifm/vifmrc +++ b/vifm/.config/vifm/vifmrc @@ -32,6 +32,7 @@ nnoremap gm :bmark nnoremap gb :bmarks nnoremap g :!nvim %f nnoremap r :run +nnoremap T :tree! nnoremap ,b :backup nnoremap ,t :!urxvt & nnoremap ,l :!less %f diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 04039f6..ed6a065 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -65,3 +65,5 @@ Stratonovich colorscheme colorscheme plugin +hypoellipticity +minorization diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl index bfb7b60..e68d3e5 100644 Binary files a/vim/.vim/spell/en.utf-8.add.spl and b/vim/.vim/spell/en.utf-8.add.spl differ diff --git a/vim/.vimrc b/vim/.vimrc index 44bf4db..96eecd9 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -29,13 +29,12 @@ Plug 'junegunn/vim-slash' Plug 'justinmk/vim-dirvish' Plug 'justinmk/vim-sneak' Plug 'kshenoy/vim-signature' -Plug 'lervag/vimtex' +Plug 'lervag/vimtex', {'commit': '8287981'} Plug 'machakann/vim-highlightedyank' Plug 'majutsushi/tagbar' Plug 'mg979/vim-visual-multi' Plug 'neomake/neomake' Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } -" Plug 'terryma/vim-multiple-cursors' Plug 'tommcdo/vim-exchange' Plug 'tommcdo/vim-ninja-feet' Plug 'tpope/vim-abolish' @@ -77,6 +76,7 @@ Plug 'KKPMW/sacredforest-vim' Plug 'junegunn/seoul256.vim' Plug 'romainl/Apprentice' Plug 'arcticicestudio/nord-vim' +" Plug 'axvr/zepl.vim' call plug#end() "" Plugin configuration {{{1 @@ -144,6 +144,8 @@ if &runtimepath =~ 'remembrall' augroup END endif let g:remembrall_suffixes = [""] +let g:ripple_winpos = "vertical" +let g:ripple_term_name = "term: ripple" " Ultisnips nnoremap cps :UltiSnipsEdit @@ -479,7 +481,8 @@ if has("nvim") endif "" Experimental {{{1 -autocmd Filetype python setl omnifunc=v:lua.vim.lsp.omnifunc +lua require'nvim_lsp'.pyls.setup{} +autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc nnoremap Remembrall('') nnoremap h lua vim.lsp.buf.hover() nnoremap a lua vim.lsp.buf.declaration() @@ -487,6 +490,7 @@ nnoremap d lua vim.lsp.buf.definition() nnoremap i lua vim.lsp.buf.implementation() nnoremap s lua vim.lsp.buf.signature_help() nnoremap t lua vim.lsp.buf.type_definition() +nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) " highlight LineNr ctermbg=159 ctermfg=27 guibg=#afffff guifg=#005fff " highlight StatusLineNC ctermbg=22 ctermfg=121 guibg=#005f00 guifg=#87ffaf -- cgit v1.2.3 From 5e5aa0b9f9b0b19472af001ea07d1c49b230dac6 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 19 Jun 2020 17:17:00 +0200 Subject: Add git pull configuration --- README.md | 5 +++-- git/.gitconfig | 2 ++ vim/.vimrc | 29 ++++++++++++++--------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cfb8027..c249ec8 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # dotfiles This repository contains my configuration files. Whenever possible, I use tools that follow the Unix philosophy. -Being a *vim* user, I find it very convenient to use tools with *vi* keybindings: +I like *vim* for text editing, +and I find it very convenient to use tools with *vi* keybindings: + Window manager: **i3** + File manager: **vifm** -+ Browser: **uzbl** ++ Browser: **qutebrowser** + PDF viewer: **zathura** + Email client: **mutt** diff --git a/git/.gitconfig b/git/.gitconfig index 0e7df50..738c719 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -19,3 +19,5 @@ default = simple [merge] ff = true +[pull] + rebase = false diff --git a/vim/.vimrc b/vim/.vimrc index 96eecd9..22447e8 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -190,13 +190,13 @@ let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=2 let g:vimtex_compiler_progname='nvr' let g:vimtex_syntax_enabled=1 -" let g:vimtex_fold_types = { -" \ 'preamble' : {'enabled' : 0}, -" \ 'envs' : { -" \ 'blacklist' : ['lemma', 'proposition', 'theorem', 'equation'], -" \ 'whitelist' : ['proof'], -" \ }, -" \} +let g:vimtex_toc_config={ + \ 'layer_status': { + \ 'content': 1, + \ 'label': 0, + \ 'todo': 1, + \ 'include': 1 }, + \ 'show_help': 0} " Pilot let g:pilot_boundary='ignore' @@ -492,11 +492,10 @@ nnoremap s lua vim.lsp.buf.signature_help() nnoremap t lua vim.lsp.buf.type_definition() nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) -" highlight LineNr ctermbg=159 ctermfg=27 guibg=#afffff guifg=#005fff -" highlight StatusLineNC ctermbg=22 ctermfg=121 guibg=#005f00 guifg=#87ffaf -" highlight Comment ctermbg=159 ctermfg=195 guibg=#afffff guifg=#d7ffff -" highlight Normal ctermbg=195 ctermfg=237 guibg=#d7ffff guifg=#3a3a3a -" highlight Special ctermfg=96 guifg=#875f87 -" highlight StatusLine ctermbg=131 ctermfg=223 guibg=#af5f5f guifg=#ffd7af -" highlight Statement ctermfg=65 guifg=#5f875f -" highlight Type ctermfg=254 guifg=#e4e4e4 +function Create_floating_buffer() + let buffer = nvim_create_buf(1, 0) + call nvim_open_win(buffer, 1, {'relative': 'editor', 'width': 100, 'height': 20, 'row': 10, 'col': 5}) +endfunction + +command! Fnew call Create_floating_buffer() +" let g:ripple_winpos = "Fnew" -- cgit v1.2.3 From 62558f19608e2bf2db031df4460925e9557de223 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 23 Jun 2020 10:08:41 +0100 Subject: Add mutt attachment marker --- mutt/.mutt/muttrc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc index 95faa6f..7ad8cbf 100644 --- a/mutt/.mutt/muttrc +++ b/mutt/.mutt/muttrc @@ -1,11 +1,11 @@ # Folders -set folder = ~/.mail -set alias_file = ~/.mutt/alias -set header_cache = ~/.mutt/cache/headers +set folder = ~/.mail +set alias_file = ~/.mutt/alias +set header_cache = ~/.mutt/cache/headers set message_cachedir = ~/.mutt/cache/bodies set certificate_file = ~/.mutt/certificates -set mailcap_path = ~/.mutt/mailcap -set tmpdir = ~/.mutt/temp +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/temp # Source crypto, aliases, mailboxes source ~/.mutt/colors/base.muttrc @@ -64,6 +64,8 @@ alternative_order text/plain text/enriched text/html set editor="$EDITOR" set include=yes +# Index +set index_format="%X %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s" # Macros macro index,pager gp " +Personal/Personal" -- cgit v1.2.3 From 296aab6ad5ce612b2e44b3eafb7454a58850aca4 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 26 Jun 2020 12:38:14 +0200 Subject: [qutebrowser] Block youtube adds --- qutebrowser/.config/qutebrowser/config.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index aa447b9..f1b72c7 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -2,6 +2,19 @@ # qute://help/configuring.html # qute://help/settings.html +from qutebrowser.api import interceptor + + +def filter_yt(info: interceptor.Request): + url = info.request_url + if (url.host() == 'www.youtube.com' + and url.path() == '/get_video_info' + and '&adformat=' in url.query()): + info.block() + + +interceptor.register(filter_yt) + c.content.images = True c.downloads.location.prompt = False c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}'] -- cgit v1.2.3 From 1ffe1b38e0a6cf182ce2a34ee38f64001dd412a3 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 16 Jul 2020 14:25:23 +0200 Subject: Update config --- qutebrowser/.config/qutebrowser/config.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index f1b72c7..e766985 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -1,9 +1,13 @@ +# pylint: disable=C0111 # Documentation: # qute://help/configuring.html # qute://help/settings.html from qutebrowser.api import interceptor +c = c +config = config + def filter_yt(info: interceptor.Request): url = info.request_url @@ -15,6 +19,11 @@ def filter_yt(info: interceptor.Request): interceptor.register(filter_yt) + +# Colors +c.colors.tabs.selected.odd.bg = "#875f5f" +c.colors.tabs.selected.even.bg = "#875f5f" + c.content.images = True c.downloads.location.prompt = False c.editor.command = ['urxvt', '-e', 'nvim', '-f', '{}'] @@ -22,7 +31,7 @@ c.fonts.hints = 'bold 12pt monospace' c.hints.chars = 'aoeuidhtns' c.hints.uppercase = True c.tabs.show = 'multiple' -c.tabs.tabs_are_windows = True +c.tabs.tabs_are_windows = False c.url.start_pages = ['file:///home/urbain/personal/index.html'] c.url.default_page = c.url.start_pages[0] c.completion.open_categories = ['bookmarks', 'history'] @@ -43,6 +52,14 @@ config.bind(",o", 'set-cmd-text -s :spawn --userscript url-from-surfraw') config.bind(",O", 'set-cmd-text -s :spawn --userscript url-from-surfraw -t') config.bind("f", 'hint all current') +config.bind("gh", 'tab-move -') +config.bind("gl", 'tab-move +') +# config.bind("gt", 'tab-next') +# config.bind("gT", 'tab-prev') +config.bind("", 'tab-next') +config.bind("", 'tab-prev') +config.bind("", 'tab-close') + # Bindings for insert mode # config.unbind("", mode='insert') config.bind("", 'fake-key ', mode='insert') @@ -87,4 +104,5 @@ c.aliases = { } # Style sheet -c.content.user_stylesheets='/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' +c.content.user_stylesheets = '/home/urbain/dotfiles/qutebrowser/.config/qutebrowser/style.css' + -- cgit v1.2.3 From 53ad321dec265dd2f625197493a9848a7559a410 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sun, 23 Aug 2020 17:50:44 +0200 Subject: Minor changes --- bash/.bashrc | 2 +- surfraw/.surfraw.bookmarks | 2 -- surfraw/.surfraw.conf | 3 --- vim/.vim/spell/en.utf-8.add | 2 ++ vim/.vim/spell/en.utf-8.add.spl | Bin 1067 -> 1111 bytes vim/.vimrc | 49 ++++++++++++++++++++-------------------- zsh/.zshrc | 2 +- 7 files changed, 29 insertions(+), 31 deletions(-) delete mode 100644 surfraw/.surfraw.bookmarks delete mode 100644 surfraw/.surfraw.conf diff --git a/bash/.bashrc b/bash/.bashrc index 542ce53..b5460fc 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -11,5 +11,5 @@ fi # FZF [ -f ~/.fzf.bash ] && source ~/.fzf.bash -FZF_MARKS_PLUGIN=$HOME/Dropbox/projects/fzf-marks/fzf-marks.plugin.bash +FZF_MARKS_PLUGIN=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.bash [ -f "$FZF_MARKS_PLUGIN" ] && source "$FZF_MARKS_PLUGIN" diff --git a/surfraw/.surfraw.bookmarks b/surfraw/.surfraw.bookmarks deleted file mode 100644 index a46527b..0000000 --- a/surfraw/.surfraw.bookmarks +++ /dev/null @@ -1,2 +0,0 @@ -startpage https://startpage.com/do/search?hmb=1&cat=web&cmd=process_search&language=english_uk&engine0=v1all&query=%s&abp=-1&nj=0&pg=0 -dictionary http://www.dictionary.com/browse/%s diff --git a/surfraw/.surfraw.conf b/surfraw/.surfraw.conf deleted file mode 100644 index 07cedef..0000000 --- a/surfraw/.surfraw.conf +++ /dev/null @@ -1,3 +0,0 @@ -SURFRAW_graphical_browser=/usr/bin/xdg-open -SURFRAW_text_browser=w3m -SURFRAW_graphical=yes diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index ed6a065..b70e5e7 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -67,3 +67,5 @@ colorscheme plugin hypoellipticity minorization +perturbative +documentclass diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl index e68d3e5..459931e 100644 Binary files a/vim/.vim/spell/en.utf-8.add.spl and b/vim/.vim/spell/en.utf-8.add.spl differ diff --git a/vim/.vimrc b/vim/.vimrc index 22447e8..77189c5 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -89,20 +89,19 @@ nnoremap cpu :GundoToggle nnoremap cp Remembrall('cp') " Fuzzy finder -nnoremap a :Ag -nnoremap b :Buffers -nnoremap C :Colors -nnoremap f :Files -nnoremap g :GitFiles -nnoremap r :History -nnoremap : :History: -nnoremap / :History/ -nnoremap l :BLines -nnoremap a :Ag - -nnoremap :Buffers -nnoremap :Files -nnoremap :GitFiles +nnoremap a :Ag +nnoremap b :Buffers +nnoremap C :Colors +nnoremap f :Files +nnoremap g :GitFiles +nnoremap r :History +nnoremap : :History: +nnoremap / :History/ +nnoremap l :BLines + +nnoremap :Buffers +nnoremap :Files +nnoremap :GitFiles " Fugitive nnoremap gs :Gstatus @@ -481,16 +480,18 @@ if has("nvim") endif "" Experimental {{{1 -lua require'nvim_lsp'.pyls.setup{} -autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc -nnoremap Remembrall('') -nnoremap h lua vim.lsp.buf.hover() -nnoremap a lua vim.lsp.buf.declaration() -nnoremap d lua vim.lsp.buf.definition() -nnoremap i lua vim.lsp.buf.implementation() -nnoremap s lua vim.lsp.buf.signature_help() -nnoremap t lua vim.lsp.buf.type_definition() -nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) +if has("nvim") + lua require'nvim_lsp'.pyls.setup{} + autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc + nnoremap Remembrall('') + nnoremap h lua vim.lsp.buf.hover() + nnoremap a lua vim.lsp.buf.declaration() + nnoremap d lua vim.lsp.buf.definition() + nnoremap i lua vim.lsp.buf.implementation() + nnoremap s lua vim.lsp.buf.signature_help() + nnoremap t lua vim.lsp.buf.type_definition() + nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) +endif function Create_floating_buffer() let buffer = nvim_create_buf(1, 0) diff --git a/zsh/.zshrc b/zsh/.zshrc index e54be1c..c1000e0 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -65,8 +65,8 @@ fi source "$HOME/.zsh/zgen/zgen.zsh" FZF_MARKS_PLUGIN_ZSH=$HOME/dotfiles/plugins/fzf-marks/fzf-marks.plugin.zsh -FZF_MARKS_COMMAND='fzf --height 40% --reverse -e' [ -f "$FZF_MARKS_PLUGIN_ZSH" ] && source "$FZF_MARKS_PLUGIN_ZSH" +FZF_MARKS_COMMAND="$FZF_MARKS_COMMAND -e -n 1 -d ' : '" if ! zgen saved; then echo "Creating a zgen save" -- cgit v1.2.3 From 9bdab305bdeed4fedcb14dd1aad63bac3912ca86 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 18 Sep 2020 12:31:59 +0100 Subject: Minor changes --- .mrconfig | 5 +++++ bin/.local/bin/keyboard | 3 ++- bin/.local/bin/keyboard-us | 8 ++++---- vim/.vimrc | 9 +-------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.mrconfig b/.mrconfig index 4152e60..f88dd35 100644 --- a/.mrconfig +++ b/.mrconfig @@ -27,3 +27,8 @@ push = git push origin master checkout = git clone 'git@github.com:urbainvaes/vim-macaw.git' update = git pull origin master push = git push origin master + +[$HOME/dotfiles/plugins/nvim-i3scratchpad] +checkout = git clone 'git@github.com:urbainvaes/nvim-i3scratchpad.git' +update = git pull origin master +push = git push origin master diff --git a/bin/.local/bin/keyboard b/bin/.local/bin/keyboard index ee1cc61..59a9ee0 100755 --- a/bin/.local/bin/keyboard +++ b/bin/.local/bin/keyboard @@ -51,8 +51,9 @@ xcape -e 'Super_L=space' # xmodmap -e "keycode any = Return" # xcape -e 'Control_R=Return' -# Make eject an Insert +# Make eject and Home an Insert xmodmap -e "keysym XF86Eject = Insert" +xmodmap -e "keysym Home = Insert" # Numbers xmodmap -e "keysym d = d D 0" diff --git a/bin/.local/bin/keyboard-us b/bin/.local/bin/keyboard-us index 1b6ceba..1b150fc 100755 --- a/bin/.local/bin/keyboard-us +++ b/bin/.local/bin/keyboard-us @@ -13,10 +13,10 @@ setxkbmap us xmodmap -e "clear Lock" xmodmap -e "keysym Caps_Lock = Control_L Control_L" xmodmap -e "add Control = Control_L" -xcape -e 'Control_L=Escape' +# xcape -e 'Control_L=Escape' # Make space (Super_L, space) -xmodmap -e "keysym space = Super_L" -xmodmap -e "add mod4 = Super_L" -xmodmap -e "keycode any = space" +# xmodmap -e "keysym space = Super_L" +# xmodmap -e "add mod4 = Super_L" +# xmodmap -e "keycode any = space" # xcape -e 'Super_L=space' diff --git a/vim/.vimrc b/vim/.vimrc index 77189c5..b225bcd 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -67,6 +67,7 @@ if isdirectory($HOME."/dotfiles/plugins") endif if has("nvim") + Plug '~/dotfiles/plugins/nvim-i3scratchpad' Plug 'neovim/nvim-lsp' endif @@ -492,11 +493,3 @@ if has("nvim") nnoremap t lua vim.lsp.buf.type_definition() nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) endif - -function Create_floating_buffer() - let buffer = nvim_create_buf(1, 0) - call nvim_open_win(buffer, 1, {'relative': 'editor', 'width': 100, 'height': 20, 'row': 10, 'col': 5}) -endfunction - -command! Fnew call Create_floating_buffer() -" let g:ripple_winpos = "Fnew" -- cgit v1.2.3 From 6d2c328b6aab6d8c8d77f2ca798aae276fb0df91 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 1 Oct 2020 08:40:59 +0100 Subject: [zsh] Fix completion --- vim/.vimrc | 2 +- zsh/.zshrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index b225bcd..4b896bb 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -244,7 +244,7 @@ set shiftwidth=4 set showcmd set splitright set smartcase -set smartindent +set nosmartindent set softtabstop=-1 " set sotftabstop=&shiftwidth " set formatoptions+=orw silent! set breakindent diff --git a/zsh/.zshrc b/zsh/.zshrc index c1000e0..1cc4d4b 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -43,6 +43,7 @@ setopt inc_append_history setopt no_share_history # Completion +autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' # Kill word -- cgit v1.2.3 From 96bfc178286b367b14e6287b3ae6dc57f3e6e2f6 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 1 Oct 2020 08:40:59 +0100 Subject: [zsh] Fix completion --- vim/.vim/spell/en.utf-8.add | 1 + vim/.vim/spell/en.utf-8.add.spl | Bin 1111 -> 1138 bytes 2 files changed, 1 insertion(+) diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index b70e5e7..dbb52c2 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -69,3 +69,4 @@ hypoellipticity minorization perturbative documentclass +preconditioner diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl index 459931e..c1471ca 100644 Binary files a/vim/.vim/spell/en.utf-8.add.spl and b/vim/.vim/spell/en.utf-8.add.spl differ -- cgit v1.2.3 From 60496da375fa7355a0f01d0e3dd6bf8afc46ffe5 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 2 Oct 2020 10:16:07 +0100 Subject: Do not sign by default --- git/.gitconfig | 4 ++-- tmux/.tmux.conf | 2 ++ zsh/.zshenv | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/git/.gitconfig b/git/.gitconfig index 0e7df50..1169c34 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -4,7 +4,7 @@ [user] name = Urbain Vaes email = urbain@vaes.uk - signingKey = 716064C0 + ; signingKey = 716064C0 [init] templatedir = ~/.git_template [alias] @@ -13,7 +13,7 @@ [http] sslverify = false [commit] - gpgSign = true + ; gpgSign = true verbose = true [push] default = simple diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index c16febc..6259e47 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -22,6 +22,8 @@ set -g pane-border-status off # Alternative: top/bottom/... set -g pane-border-format "#{pane_current_command}" set -g status-justify centre # Center window list set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # Get | cursor nvim insert +set -sa terminal-overrides ',xterm*:RGB' +set -sa terminal-overrides ',rxvt*:RGB' set-hook -g session-created "if-shell '[ -n \""'$SSH_CONNECTION'"\" ]' 'set status-bg \"#aa4444\"' 'set status-bg \"green\"'" set-hook -g client-attached "if-shell '[ -n \""'$SSH_CONNECTION'"\" ]' 'set status-bg \"#aa4444\"' 'set status-bg \"green\"'" diff --git a/zsh/.zshenv b/zsh/.zshenv index 7917e82..7991bf1 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -16,5 +16,5 @@ fi [[ -f "$HOME/.pythonrc" ]] && export PYTHONSTARTUP="$HOME/.pythonrc" # Source guix profile -guix_profile=$HOME/.guix-env -[[ -f $guix_profile ]] && . $guix_profile +# guix_profile=$HOME/.guix-env +# [[ -f $guix_profile ]] && . $guix_profile -- cgit v1.2.3 From 2c5e2b7a6667fd4e726bba3e50f9ccf6ce13bab3 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 2 Oct 2020 10:22:36 +0100 Subject: Disable lsp on server --- vim/.vimrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index 4b896bb..99fd8d4 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -68,6 +68,9 @@ endif if has("nvim") Plug '~/dotfiles/plugins/nvim-i3scratchpad' +endif + +if hostname() != "peuplier" Plug 'neovim/nvim-lsp' endif @@ -481,7 +484,7 @@ if has("nvim") endif "" Experimental {{{1 -if has("nvim") +if has("nvim") && hostname() != "peuplier" lua require'nvim_lsp'.pyls.setup{} autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc nnoremap Remembrall('') -- cgit v1.2.3