

This is why I added a keybinding to Vim that corrects the spelling mistakes, without interrupting my flow. At about 80 words per minute, my typing skills are not bad, but I still make a lot of typos.

While inserting mathematics is an important part of my note-taking setup, most of the time I’m typing English. I for i in reversed (synstackids ) if i in texIgnoreMathZoneIds or i in texMathZoneIdsĮndglobal Correcting spelling mistakes on the fly Ignore = texIgnoreMathZoneIds def math ( ) : eval ( 'map(' + str (texIgnoreMathZones ) + ", 'hlID(v:val)')" ) eval ( 'map(' + str (texMathZones ) + ", 'hlID(v:val)')" ) Add the following to the top of your snippets file: Using the syntax highlighting of Vim, it can be determined whether or not UltiSnips should expand the snippet depending if you’re in math or text. The solution to this problem is adding a context to snippets. One thing to consider when writing these snippets is, ‘will these snippets collide with usual text?’įor example, according to my dictionary, there are about 72 words in English and 2000 words in Dutch that contain sr, which means that while I’m typing the word disregard, the sr would expand to ^2, giving me di^2egard. I use the plugin UltiSnips to manage my snippets. You can even use one snippet inside another: Snippets can also be dynamic: when I type today and press Tab, the word today will be replaced by the current date, and box Tab becomes a box that automatically grows in size. Snippets What’s a snippet?Ī snippet is a short reusable piece of text that can be triggered by some other text.įor example, when I type sign and press Tab, the word sign will be expanded to a signature: With this set up, I come to the crux of this blog post: writing LaTeX as fast as the lecturer can write on the blackboard. The following animation should make that clear. This feature also replaces \bigcap by by ∩, \in by ∈ etc.
#Cases in texmacs code#
This is a feature where LaTeX code is replaced or made invisible when your cursor is not on that line.īy making \, $ invisible, they’re less obtrusive which gives you a better overview of the document. The last two lines configure the concealment. Plug 'lervag/vimtex' let g :tex_flavor = 'latex' let g :vimtex_view_method = 'zathura' let g :vimtex_quickfix_mode = 0 set conceallevel = 1 let g :tex_conceal = 'abdmg' Using vim-plug, I configured it as follows: It provides syntax highlighting, table of contents view, synctex, etc. The LaTeX plugin I’m using in Vim is vimtex. I’m using Ubuntu with bspwm as my window manager.
#Cases in texmacs pdf#
On the left you see Vim and on the right my pdf viewer, Zathura, which also has Vim-like keybindings. Here’s what my screen looks like when I’m editing LaTeX: It has a fairly steep learning curve, but once you’ve got the basics down, it’s hard to get back to an editor without Vim keybindings. I use it for writing code, LaTeX, markdown, … basically everything that’s text-based. Vim is a powerful general purpose text editor that’s very extensible.

