Re: Warning for writing partial file
On 15.08.15 19:47, BPJ wrote: I have acquired a tendency to overuse `v` or `V` in cases where it is not (strictly) needed. When writing prose I type `vipgq` or somesuch and then immediately `v:w` or even `gv:w` on misguided reflex. I'm curious what others have done when getting into such bad habits. Having over many years now, never found a use for any formatting other than gq} , that wouldn't happen here. In any event, I've mapped that to ^W, i.e. a big Wrap, so I have something mnemonic and short. (Might not be optimal for anyone who has found some sort of use for the window commands.) Erik -- -- 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: How to make pressing TAB key enter a single TAB character in a .py file?
2015-08-16 2:59 GMT+03:00 Peng Yu pengyu...@gmail.com: On Saturday, August 15, 2015 at 5:36:44 PM UTC-5, ZyX wrote: 2015-08-16 1:27 GMT+03:00 Peng Yu pengyu...@gmail.com: Hi, I have the following modline in a .py file. When I type TAB, two TAB characters are entered into the file. How only let one TAB characters entered? Thanks. # vim: set noexpandtab tabstop=2: It seems that shiftwidth is not the problem, as I tried the following modline yet a TAB key still is two TAB characters. Could you try it and let me know what is the correct modline? Thanks. There is also softtabstop. (Actually *it* is the one that contains how many spaces *TAB* inserts, shiftwidth is for other things like `` or `` normal commands.) But it defaults to zero (noexpandtab tabstop=2 shiftwidth=2 softtabstop=0 will make TAB insert 2-wide tab) and I forgot that Python ftplugin modifies default. # vim: set noexpandtab tabstop=2 shiftwidth=2: Default shiftwidth for Python files is 4 (which is tabstop * 2 with your settings, so two tabs). You need to set shiftwidth option as well. -- Regards, Peng -- -- 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. -- -- 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. -- -- 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: How to make pressing TAB key enter a single TAB character in a .py file?
Peng Yu wrote: On Saturday, August 15, 2015 at 5:36:44 PM UTC-5, ZyX wrote: 2015-08-16 1:27 GMT+03:00 Peng Yu pengyu...@gmail.com: Hi, I have the following modline in a .py file. When I type TAB, two TAB characters are entered into the file. How only let one TAB characters entered? Thanks. # vim: set noexpandtab tabstop=2: It seems that shiftwidth is not the problem, as I tried the following modline yet a TAB key still is two TAB characters. Could you try it and let me know what is the correct modline? Thanks. # vim: set noexpandtab tabstop=2 shiftwidth=2: You probably have 'softtabstop' set to the wrong value. Note that most people recommend using a tabstop of 8 in Python files, or no tabs at all. Doing otherwise is likely to get you in trouble some day. -- There can't be a crisis today, my schedule is already full. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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: How to make pressing TAB key enter a single TAB character in a .py file?
2015-08-16 16:23 GMT+03:00 Bram Moolenaar b...@moolenaar.net: Peng Yu wrote: On Saturday, August 15, 2015 at 5:36:44 PM UTC-5, ZyX wrote: 2015-08-16 1:27 GMT+03:00 Peng Yu pengyu...@gmail.com: Hi, I have the following modline in a .py file. When I type TAB, two TAB characters are entered into the file. How only let one TAB characters entered? Thanks. # vim: set noexpandtab tabstop=2: It seems that shiftwidth is not the problem, as I tried the following modline yet a TAB key still is two TAB characters. Could you try it and let me know what is the correct modline? Thanks. # vim: set noexpandtab tabstop=2 shiftwidth=2: You probably have 'softtabstop' set to the wrong value. Note that most people recommend using a tabstop of 8 in Python files, or no tabs at all. Doing otherwise is likely to get you in trouble some day. I used tabstop=4 in powerline with noexpandtab for years. No troubles. Just don’t try to mix tabs and spaces, in case you do note that Python thinks that 1 tab is 8 spaces. If all indentation is consistent there will be no troubles. -- There can't be a crisis today, my schedule is already full. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- 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. -- -- 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: C comment block indentation woes
On 15 August 2015, Erik Christiansen dva...@internode.on.net wrote: On 14.08.15 04:02, Oliver Wraight wrote: [...] comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,:// Last set from /usr/share/vim/vim74/ftplugin/c.vim that's what needs to be tweaked. Unfortunately, performing a :set with that here gives: E518: Unknown option: -,mO:* [...] On a side note: you can usually avoid dealing with :set for options that take string values by using let option = ... instead of set option= E.g. for the line above: let comments = 'sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,://' To set local options you'd use let l:option = ... instead of setlocal option=..., and to explicitly set a global options you can do let g:option = ... instead of setglobal option= Of course, option can also be used to read the value of an option if needed. /lcd -- -- 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.
netrw 'qb' starts recoding macro
From netrw normal mode, I type 'qb' to list bookmarks. Sometimes 'qb' will list bookmarks as intended. But usually the 'q' just starts recording a macro. Is there a setting to make 'q' always list bookmarks from netrw normal mode? 'q' is too easy to activate recording accidentally. Is there a way to replace the 'q' with a colon command that starts recording? Thank you. -- -- 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.