Re: How to highlight keyword in comments?
Hi Shiyao! On Fr, 05 Dez 2014, Shiyao Ma wrote: > My objective: to highlight all my custom keywords within comments regardless > of the filetype. > > Sympton: everything works fine (in Python, Cpp, etc). But in .tex file, the > highlight won't work. > > My code: > augroup colors_settings > autocmd! > autocmd Syntax * syn keyword globalTodo contained XXX TODO NB FIXME WARN > \ | exe "syn match globalComment +" . substitute(escape(&cms, > ' ."*+'), '\s*%s', '.*', ""). "+ contains=globalTodo" > \ | hi link globalTodo Todo > \ | hi link globalComment Comment > augroup END > > > Example tex file: > > % NB here it will be highlighed. > \documentclass[conference]{IEEEtran} > > \begin{document} > \title{Network Security Through Penetration} > \maketitle > > % NB here won't be higlighed. > \begin{abstract}\boldmath > \end{abstract} > > \section{Conclusion} > > \end{document} > > > The code is self contained, so it's easy to try out locally. The first NB is > higlighted while the second is not. > > How to highlight the second? > > In case of gmail 72tw limit, a bpaste version: > https://bpaste.net/show/5a1f372a98d8 I am not exactly sure, why Vim doesn't highlight the second comment. But here is a way to make what you want. Create a file ~/.vim/after/syntax/tex.vim and insert there: syn keyword globalTodo contained XXX TODO NB FIXME WARN syn cluster texCommentGroup add=globalTodo hi link globalTodo Todo That should be it. By modifying the texCommentGroup cluster, you can add more syntax items to all comment sections in your file. See also the help add :h mysyntaxfile-add Best, Christian -- Das Leben besteht in dem, was ein Mensch den ganzen Tag über denkt. -- Ralph Waldo Emerson -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: VIM on a small embedded system
Oliver Rath [14-12-06 12:12]: > Hi Meino, > > you can use the "minimal" flag to build a small vim variant. > Additionally, on gentoo you can build > app-editors/e3, which is an vi-clone, written in assembler (arm-code, too). > > If you only want to disable some features, the hints of Tom are fine. > Additionally, syntax highilghting is a thing, which eats power. > > Hth, > Oliver > > > On 06.12.2014 05:39, meino.cra...@gmx.de wrote: > > Hi, > > > > on an Arietta G25 I have installed Gentoo Linux and (of course :) > > vim. > > The Arietta (http://www.acmesystems.it/arietta) has enough power > > to use vim ... but it has not plenty of it. > > > > I am using vim in the terminal version via ssh on the Arietta. > > > > (The following question is *NO* reflection on vim or the Arietta ! > > It may only my limited English...;) > > What features of vim eat most CPU power? > > What features shall I disable? > > > > Thank you very mch in advance for any help! > > Best regards, > > Meino > > > > > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > Hi Tom, Hi Oliver, Thanks a lot for helping me out here...! 8) I will check, whether diabling highlting will speed up things enough. If not I will try to restrict vim further (which I dont want to need to since I a fully powered vim...of course :). Currently I emerge e3 addtionally to see, what this "little" beast can do. Thanks again and have a nice weekend! Best regards, Meino -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: VIM on a small embedded system
Hi Meino, you can use the "minimal" flag to build a small vim variant. Additionally, on gentoo you can build app-editors/e3, which is an vi-clone, written in assembler (arm-code, too). If you only want to disable some features, the hints of Tom are fine. Additionally, syntax highilghting is a thing, which eats power. Hth, Oliver On 06.12.2014 05:39, meino.cra...@gmx.de wrote: > Hi, > > on an Arietta G25 I have installed Gentoo Linux and (of course :) > vim. > The Arietta (http://www.acmesystems.it/arietta) has enough power > to use vim ... but it has not plenty of it. > > I am using vim in the terminal version via ssh on the Arietta. > > (The following question is *NO* reflection on vim or the Arietta ! > It may only my limited English...;) > What features of vim eat most CPU power? > What features shall I disable? > > Thank you very mch in advance for any help! > Best regards, > Meino > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Vim creating backups despite backup being disabled in rc
Am 2014-12-06 00:53, schrieb Manish Jain: Hi, I am using Vim version 7.4.430 on FreeBSD-10.1 (i386). The last line of .vimrc is : set nobackup Yet whenever I edit a file, Vim creates a backup file .un~ I had never seen this behaviour in Vim, and it is getting annoying as it is messing up my filesystem. I tried inserting the following line to stop the behaviour : That is not a backup file but an undo file which you can read about at :h undo-persistence Which also links to the 'undofile' setting which lets you disable this. Best, Christian -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: VIM on a small embedded system
> on an Arietta G25 I have installed Gentoo Linux and (of course :) > vim. I used to run vim on a zaurus sl-c300, which worked fine. Sometimes it was necessary, for certain filetypes, to turn off indentation (indentexpr) and fold expressons (foldexpr) which can cause noticeable lags under certain circumstances but should be ok most of the time. Regards, Tom -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.