Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.minimal-tex-vimrc snippets #21

Open
RichardScharf opened this issue Oct 15, 2020 · 3 comments
Open

.minimal-tex-vimrc snippets #21

RichardScharf opened this issue Oct 15, 2020 · 3 comments

Comments

@RichardScharf
Copy link

RichardScharf commented Oct 15, 2020

Hi, thanks for sharing your amazing setup on your blog!

I've managed to set up the shortcut manager with gnome in the .config using your help:

'gnome-terminal',
'--wait',
'--geometry', '60x5',
'--', "vim",
f"{filename}",
"-u", "~/.vim/minimal-tex-vimrc",
])

if I skip the -u flag vim opens normally and everything works perfectly.

But using the -u flag results in vim opening with the cursor between the $$ correctly, but as soon as I type wq it literally pastes < Esc >:wq< CR >" as text.

Snippets like sum stop working entirely, even after adding
call plug#begin('~/.vim/plugged')

with ultisnips and snippets to the minimal-tex-vimrc.

I got the same problem using urxvt and your example .config file.

I'm using a VM running on Hyper-V with enchanced Session mode and can use checkpoints to try stuff out.

So don't hesitate to recommend the "risky" stuff too :D

@kevin-corcoran
Copy link

Did you figure this out? I'm having the same issues now.

@258204
Copy link

258204 commented Aug 17, 2021

Same issue as well.

@andreykaere
Copy link

I struggled myself back when I was configuring all these stuff. I dont really remember what helped me, but I guess "set nocompatible" does the trick. Anyway, I am posting here my .minimal-tex-vimrc:

set nocompatible
set ft=tex

set rtp+=~/current_course

call plug#begin('~/.vim/plugged')
Plug 'lervag/vimtex', { 'frozen': 1 }
Plug 'sirver/ultisnips', { 'frozen': 1 }
Plug 'KeitaNakamura/tex-conceal.vim', { 'frozen': 1 }
call plug#end()

let g:UltiSnipsExpandTrigger = ''
let g:UltiSnipsJumpForwardTrigger = ''
let g:UltiSnipsJumpBackwardTrigger = ''
let g:UltiSnipsUsePythonVersion = 3
let g:tex_flavor = 'latex'

let g:vimtex_syntax_enabled = 1
let g:vimtex_syntax_minted = 1

"set conceallevel=1
"let g:tex_conceal='abdmg'

set backspace=indent,eol,start

autocmd BufNewFile,BufRead *.tex set filetype=tex

" Quickly closing the window by jamming wq
inoremap wq :wq
nnoremap wq :wq
inoremap qw :wq
nnoremap qw :wq

"Quickly getting back on track when I mess something up
inoremap u
vnoremap Iu
nnoremap ui

" Start insert mode between $$'s
autocmd BufEnter * startinsert | call cursor(1, 2)

nnoremap j gj
nnoremap k gk

I hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants