From 2226b04eec38c0e3bd40337cba07834009a5c5af Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 18 Aug 2022 10:01:29 +0200 Subject: Improve vim label --- vim/.vimrc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index da2a427..5381268 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -48,6 +48,7 @@ Plug 'tpope/vim-repeat' Plug 'tpope/vim-rsi' Plug 'tpope/vim-scriptease' Plug 'tpope/vim-sensible' +Plug 'tpope/vim-speeddating' Plug 'tpope/vim-surround' Plug 'tpope/vim-unimpaired' Plug 'troydm/zoomwintab.vim' @@ -65,7 +66,8 @@ endif if has("nvim") && hostname() != "peuplier" Plug '~/dotfiles/plugins/nvim-i3scratchpad' Plug 'neovim/nvim-lspconfig' - " Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + " Plug 'nvim-treesitter/nvim-treesitter' + " Plug 'hrsh7th/nvim-cmp', { 'branch': 'main' } " Plug 'nvim-treesitter/playground' endif @@ -197,7 +199,6 @@ let g:vimtex_delim_toggle_mod_list = [ \ ['\Biggl', '\Biggr'], \] -nmap :setf txti\begin{align}0i\end{align} nmap m`gcc`` " Pilot @@ -323,7 +324,7 @@ nnoremap Y y$ " Formatting nnoremap fw m`:silent! keeppattern %s/\s\+$//``:update -nnoremap ft m`:silent! keeppattern %s/^ \+//g``:update +nnoremap ft m`:silent! keeppattern %s/ / /g``:update nmap ff fwft " Swap / and / @@ -419,7 +420,7 @@ endif if has("nvim") && hostname() != "peuplier" try " lua require('lspconfig').pyls.setup{} - " lua require('lspconfig').julials.setup{} + lua require('lspconfig').julials.setup{} " autocmd Filetype python setlocal omnifunc=v:lua.vim.lsp.omnifunc autocmd Filetype julia setlocal omnifunc=v:lua.vim.lsp.omnifunc nnoremap Remembrall('') @@ -451,3 +452,14 @@ let g:ripple_repls = { " Vim sensible fix inoremap + +" For latex snippet +function! Get_surrounding() + let dict = { 'equation': 'eq', 'align': 'eq'} + let env = vimtex#env#get_surrounding("normal")[0]['name'] + if has_key(dict, env) + return dict[env] + else + return env + endif +endfunction -- cgit v1.2.3