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 --- vim/.vimrc | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 7 deletions(-) (limited to 'vim') 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(-) (limited to 'vim') 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 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(-) (limited to 'vim') 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(+) (limited to 'vim') 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(-) (limited to 'vim') 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 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(-) (limited to 'vim') 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(-) (limited to 'vim') 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 (limited to '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(-) (limited to 'vim') 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 (limited to '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 (limited to '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(-) (limited to 'vim') 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 (limited to 'vim') 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(-) (limited to 'vim') 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(-) (limited to 'vim') 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 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 (limited to 'vim') 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(-) (limited to 'vim') 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(-) (limited to 'vim') 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(+) (limited to 'vim') 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 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(-) (limited to 'vim') 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