From 6dc1aaadb5232530b903b3f71e124ec59d096874 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 10 Jun 2021 19:19:25 +0100 Subject: Minar changes --- vim/.config/nvim/UltiSnips | 1 + vim/.config/nvim/mySnippets | 1 - vim/.vim/spell/en.utf-8.add | 1 + vim/.vim/spell/en.utf-8.add.spl | Bin 1181 -> 1194 bytes vim/.vimrc | 32 ++++++++++++++++++++++++++++---- 5 files changed, 30 insertions(+), 5 deletions(-) create mode 120000 vim/.config/nvim/UltiSnips delete mode 120000 vim/.config/nvim/mySnippets (limited to 'vim') diff --git a/vim/.config/nvim/UltiSnips b/vim/.config/nvim/UltiSnips new file mode 120000 index 0000000..2e8bc66 --- /dev/null +++ b/vim/.config/nvim/UltiSnips @@ -0,0 +1 @@ +../../../../.vim/UltiSnips \ No newline at end of file diff --git a/vim/.config/nvim/mySnippets b/vim/.config/nvim/mySnippets deleted file mode 120000 index e7aff9e..0000000 --- a/vim/.config/nvim/mySnippets +++ /dev/null @@ -1 +0,0 @@ -../../../../.vim/mySnippets \ No newline at end of file diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index c023ef9..5e08f9c 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -73,3 +73,4 @@ preconditioner subfolder postdoc Gaussians +discretizations diff --git a/vim/.vim/spell/en.utf-8.add.spl b/vim/.vim/spell/en.utf-8.add.spl index 3bf5f26..2fc2668 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 598d5d0..6184181 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -150,6 +150,8 @@ endif let g:remembrall_suffixes = [""] let g:ripple_winpos = "vertical" let g:ripple_term_name = "term: ripple" +nmap ,w (ripple_send_motion)iw:Ripple +nmap , :Ripple " Ultisnips nnoremap cps :UltiSnipsEdit @@ -184,8 +186,8 @@ let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpBackwardTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsListSnippets="" -let g:UltiSnipsSnippetDirectories=['UltiSnips', 'mySnippets'] -let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" +" let g:UltiSnipsSnippetDirectories=['UltiSnips'] +" let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" " let g:UltiSnipsUsePythonVersion=3 " Vimtex @@ -295,8 +297,8 @@ nnoremap :q nnoremap ,bd :ls:bd nnoremap ,te :tabedit -nnoremap ,tl :+tabmove -nnoremap ,th :-tabmove +nnoremap gl :+tabmove +nnoremap gh :-tabmove nnoremap ,t0 :tabmove 0 nnoremap ,t$ :tabmove @@ -509,3 +511,25 @@ endif " nnoremap t lua vim.lsp.buf.type_definition() " nnoremap lua vim.lsp.stop_client(vim.lsp.get_active_clients()) " endif + + +function! s:remove_leading_whitespaces(code) + echom "test" + + " Check if the first line is indented + let leading_spaces = matchstr(a:code, '^\s\+') + + if leading_spaces == "" + return a:code + endif + + " Calculate indentation + let indentation = strlen(leading_spaces) + + " Remove further indentations + return substitute(a:code, '\(^\|\r\zs\)\s\{'.indentation.'}', "", "g") +endfunction + +let g:ripple_repls = { + \ "python": ["ipython", "\[200~", "\[201~", 1, function('s:remove_leading_whitespaces')] + \ } -- cgit v1.2.3