summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc20
1 files changed, 16 insertions, 4 deletions
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 <right> :setf txt<cr>i\begin{align}<cr><cr><esc>0i\end{align}<up>
nmap <c-c> m`gcc<esc>``
" Pilot
@@ -323,7 +324,7 @@ nnoremap Y y$
" Formatting
nnoremap <Leader>fw m`:silent! keeppattern %s/\s\+$//<cr>``:update<cr>
-nnoremap <Leader>ft m`:silent! keeppattern %s/^ \+//g<cr>``:update<cr>
+nnoremap <Leader>ft m`:silent! keeppattern %s/ / /g<cr>``:update<cr>
nmap <Leader>ff <Leader>fw<Leader>ft
" Swap <c-p>/<c-n> and <up>/<down>
@@ -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 <silent> <expr> <c-g> Remembrall('<c-g>')
@@ -451,3 +452,14 @@ let g:ripple_repls = {
" Vim sensible fix
inoremap <c-w> <c-w>
+
+" 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