Re: [Vim-latex-devel] [Feature Requests]: Highlight matched pairs under the cursor
Brought to you by:
srinathava,
tmaas
From: Ted P. <te...@te...> - 2012-08-21 16:56:16
|
At least for braces (as opposed to opening and closing environment tags), you can use DoMatchParen, which comes with the standard plugin pi_paren. Add: :DoMatchParen to your ~/.vimrc (or to an after/ftplugin/tex.vim file in your ~/.vim directory). Alternatively, execute that in command mode directly. That should give you brace matching. See: :help DoMatchParen for more information. ":help matchpairs" may also be helpful. Again, for braces, an alternative is to set: :set showmatch to briefly jump from one brace to another while typing. I think you know this already, but jumping (via %) works with environments. You can jump from a \begin to the matching \end with %. Likewise, you can fold on environments, which has a very similar feel. Consequently, because jumping and folding already work on environments and because many environments wander off the edge of a page, I don't think there has been the demand for highlighting the matching closing construct. I think it's possible though. --Ted On 08/14/2012 05:14 AM, 蘇連傑 wrote: > Dear developer, > > We know that vim can highlight matched parentheses under the cursor, > this feature help us to know which is the matched pair to the current > one without a jump (e.g. %). Similiar to this feature, for HTML files > there exist some plugin, e. g., [ > http://www.vim.org/scripts/script.php?script_id=3818 ] and [ > https://gist.github.com/1386336 ], for highlighting matched tags in > html/xml file. > > After using such plugins, an idea comes to my mind: why not let vim > highlight matched pairs in LaTeX? Vim-latex can highlight mismatched > standard environments as errors, but do not show a dynamic highlight > when cursor moves. If such a feature can be added in some newer > version, I will be very grateful. :) The matched pairs can be (mostly) > environments, and \left \right pairs et al.. > > PS thanks for your greate jobs! :) > > Su, greetings from China. > > -- > 知识共享,世界大同…… > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > -- Ted Pavlic <te...@te...> |