Hello,
I was trying to find out a way how to set options for a terminal buffer
and there seems to be no way to to that. BufAdd and BufEnter trigger to
early (buftype not yet set) and OptionSet autocommand is not triggered.
Is there other way?
Best regards,
Marcin
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Saturday, September 30, 2017
Friday, September 29, 2017
Re: VIM and NVD Vulnerability
Susanne Ramsey wrote:
> The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
> Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
> NOTE: there might be a limited number of scenarios in which this has security relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it is
> only the initial release 8.0 or the subsequent patched versions that
> are vulnerable. I have searched the VIM website readme and other
> documents but can't find the answer, so I am turning to you. I
> appreciate your assistance. Is the current version still vulnerable
> to the issue noted above or has this been remediated in the patch
> updates?
Patch 8.0.0693 fixed the first issue.
Note that it requires the user to install and source a script from
someone else. This is not really a security issue. I haven't wasted
time arguing about the reported risks.
--
Your fault: core dumped
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
> Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
> NOTE: there might be a limited number of scenarios in which this has security relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it is
> only the initial release 8.0 or the subsequent patched versions that
> are vulnerable. I have searched the VIM website readme and other
> documents but can't find the answer, so I am turning to you. I
> appreciate your assistance. Is the current version still vulnerable
> to the issue noted above or has this been remediated in the patch
> updates?
Patch 8.0.0693 fixed the first issue.
Note that it requires the user to install and source a script from
someone else. This is not really a security issue. I haven't wasted
time arguing about the reported risks.
--
Your fault: core dumped
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: VIM and NVD Vulnerability
On Do, 28 Sep 2017, Ramsey, Susanne B. wrote:
> Greetings;
>
> The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
> Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
> NOTE: there might be a limited number of scenarios in which this has security relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it is only the initial release 8.0 or the subsequent patched versions that are vulnerable. I have searched the VIM website readme and other documents but can't find the answer, so I am turning to you. I appreciate your assistance. Is the current version still vulnerable to the issue noted above or has this been remediated in the patch updates?
If I read the debian changelog correctly, this has been fixed:
,----
| * Backport upstream patches to fix CVE-2017-11109 (Closes: #867720)
| + 8.0.0703: Illegal memory access with empty :doau command
| + 8.0.0706: Crash when cancelling the cmdline window in Ex mode
| + 8.0.0707: Freeing wrong memory when manipulating buffers in autocommands
`----
Christian
--
Alles Wichtige lernt man von den Frauen, alles Unwichtige vergißt
man bei ihnen.
-- Hans Söhnker
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Greetings;
>
> The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
> Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
> NOTE: there might be a limited number of scenarios in which this has security relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it is only the initial release 8.0 or the subsequent patched versions that are vulnerable. I have searched the VIM website readme and other documents but can't find the answer, so I am turning to you. I appreciate your assistance. Is the current version still vulnerable to the issue noted above or has this been remediated in the patch updates?
If I read the debian changelog correctly, this has been fixed:
,----
| * Backport upstream patches to fix CVE-2017-11109 (Closes: #867720)
| + 8.0.0703: Illegal memory access with empty :doau command
| + 8.0.0706: Crash when cancelling the cmdline window in Ex mode
| + 8.0.0707: Freeing wrong memory when manipulating buffers in autocommands
`----
Christian
--
Alles Wichtige lernt man von den Frauen, alles Unwichtige vergißt
man bei ihnen.
-- Hans Söhnker
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: VIM and NVD Vulnerability
While I can see value in fixing the invalid-free instance described,
a vimscript can already call out to any shell command it wants.
$ echo 'Important file, do not delete'! > important_file.txt
$ echo "call system('touch demo.txt')" > demo.vim
$ echo "call system('rm important_file.txt')" >> demo.vim
$ vim -S demo.vim -cq
$ ls demo.txt important_file.txt
demo.txt
So I'm not sure there's any *security* issue here that doesn't come
with being able to execute arbitrary commands.
-tim
On 2017-09-28 18:29, Ramsey, Susanne B. wrote:
> Greetings;
>
> The National Vulnerability Database (NVD) lists a high
> vulnerability for VIM 8.0.
> https://nvd.nist.gov/vuln/detail/CVE-2017-11109 Vim 8.0 allows
> attackers to cause a denial of service or possibly have unspecified
> other impact via a crafted source (aka -S) file. NOTE: there might
> be a limited number of scenarios in which this has security
> relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it
> is only the initial release 8.0 or the subsequent patched versions
> that are vulnerable. I have searched the VIM website readme and
> other documents but can't find the answer, so I am turning to you.
> I appreciate your assistance. Is the current version still
> vulnerable to the issue noted above or has this been remediated in
> the patch updates?
>
> Best regards,
> Susanne Ramsey
>
>
> --
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a vimscript can already call out to any shell command it wants.
$ echo 'Important file, do not delete'! > important_file.txt
$ echo "call system('touch demo.txt')" > demo.vim
$ echo "call system('rm important_file.txt')" >> demo.vim
$ vim -S demo.vim -cq
$ ls demo.txt important_file.txt
demo.txt
So I'm not sure there's any *security* issue here that doesn't come
with being able to execute arbitrary commands.
-tim
On 2017-09-28 18:29, Ramsey, Susanne B. wrote:
> Greetings;
>
> The National Vulnerability Database (NVD) lists a high
> vulnerability for VIM 8.0.
> https://nvd.nist.gov/vuln/detail/CVE-2017-11109 Vim 8.0 allows
> attackers to cause a denial of service or possibly have unspecified
> other impact via a crafted source (aka -S) file. NOTE: there might
> be a limited number of scenarios in which this has security
> relevance.
>
>
> Unfortunately, the info provided in the CVE does not specify if it
> is only the initial release 8.0 or the subsequent patched versions
> that are vulnerable. I have searched the VIM website readme and
> other documents but can't find the answer, so I am turning to you.
> I appreciate your assistance. Is the current version still
> vulnerable to the issue noted above or has this been remediated in
> the patch updates?
>
> Best regards,
> Susanne Ramsey
>
>
> --
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thursday, September 28, 2017
VIM and NVD Vulnerability
Greetings;
The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
NOTE: there might be a limited number of scenarios in which this has security relevance.
Unfortunately, the info provided in the CVE does not specify if it is only the initial release 8.0 or the subsequent patched versions that are vulnerable. I have searched the VIM website readme and other documents but can't find the answer, so I am turning to you. I appreciate your assistance. Is the current version still vulnerable to the issue noted above or has this been remediated in the patch updates?
Best regards,
Susanne Ramsey
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The National Vulnerability Database (NVD) lists a high vulnerability for VIM 8.0. https://nvd.nist.gov/vuln/detail/CVE-2017-11109
Vim 8.0 allows attackers to cause a denial of service or possibly have unspecified other impact via a crafted source (aka -S) file.
NOTE: there might be a limited number of scenarios in which this has security relevance.
Unfortunately, the info provided in the CVE does not specify if it is only the initial release 8.0 or the subsequent patched versions that are vulnerable. I have searched the VIM website readme and other documents but can't find the answer, so I am turning to you. I appreciate your assistance. Is the current version still vulnerable to the issue noted above or has this been remediated in the patch updates?
Best regards,
Susanne Ramsey
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wednesday, September 27, 2017
How to set highlight search to be displayed in only lines affected by substitute c-confirm flag?
Hi,
1. create text file with the following three lines:
aa
ab
ac
2. turn on search highlight with:
:set hls
3. now jump to third row:
:3
4. visually select whole line:
V
5. Now do the substitute with "c" flag (confirm):
:s/a/x/gc
Now highlight search marks letter a in whole file, despite only line 3 was selected with visual selection and it is obvious substitute will only be affected on line 3. Is is possible to set that highlight search marks only affected (by visual mode selection) lines? Like in example letter "a" in line 3 only.
Thanks
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1. create text file with the following three lines:
aa
ab
ac
2. turn on search highlight with:
:set hls
3. now jump to third row:
:3
4. visually select whole line:
V
5. Now do the substitute with "c" flag (confirm):
:s/a/x/gc
Now highlight search marks letter a in whole file, despite only line 3 was selected with visual selection and it is obvious substitute will only be affected on line 3. Is is possible to set that highlight search marks only affected (by visual mode selection) lines? Like in example letter "a" in line 3 only.
Thanks
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, September 26, 2017
Re: Do you use in your plugin mappings?
Hi,
> I have a question for you plugin developers (but I am interested also
> in a user's perspective). What do you think is the best approach to
> deal with a conflicting mapping (i.e., a mapping already defined
> elsewhere) in a plugin?
>
> I currently define my plugin's mappings with <unique>, but from time
> to time users report `E227: mapping already exists` errors as bugs,
> so I am not sure that this is the best approach.
I do use <unique> in my plugins. But only if the user doesn't override the default keybinding with his own. I rely on <plug>mappings to do so.
If the user report the error, well we need to explain her/him what can be done to silence the error. The user has to make a choice which we cannot do for her/him: either to continue with the keybinding defined in the .vimrc or provided in another plugin, or to choose another keybinding for our plugin.
In my ftplugins, I've used <unique> <plug>ged mappings a few times, but I'm not sure this is the best thing to do.
Which reminds me in a few places I've replaced <unique> with another approach that issues a less intrusive warning.
It's used with:
nnoremap <Plug>TogglePreviewIfHold :Toggle Cpreview_if_hold<cr>
call lh#mapping#plug({'lhs': '<localleader>tpw', 'rhs': '<Plug>TogglePreviewIfHold'}, 'n')
With lh#mapping#plug being defined over there: https://github.com/LucHermitte/lh-vim-lib/blob/master/autoload/lh/mapping.vim#L99
HTH,
--
Luc Hermitte
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I have a question for you plugin developers (but I am interested also
> in a user's perspective). What do you think is the best approach to
> deal with a conflicting mapping (i.e., a mapping already defined
> elsewhere) in a plugin?
>
> I currently define my plugin's mappings with <unique>, but from time
> to time users report `E227: mapping already exists` errors as bugs,
> so I am not sure that this is the best approach.
I do use <unique> in my plugins. But only if the user doesn't override the default keybinding with his own. I rely on <plug>mappings to do so.
If the user report the error, well we need to explain her/him what can be done to silence the error. The user has to make a choice which we cannot do for her/him: either to continue with the keybinding defined in the .vimrc or provided in another plugin, or to choose another keybinding for our plugin.
In my ftplugins, I've used <unique> <plug>ged mappings a few times, but I'm not sure this is the best thing to do.
Which reminds me in a few places I've replaced <unique> with another approach that issues a less intrusive warning.
It's used with:
nnoremap <Plug>TogglePreviewIfHold :Toggle Cpreview_if_hold<cr>
call lh#mapping#plug({'lhs': '<localleader>tpw', 'rhs': '<Plug>TogglePreviewIfHold'}, 'n')
With lh#mapping#plug being defined over there: https://github.com/LucHermitte/lh-vim-lib/blob/master/autoload/lh/mapping.vim#L99
HTH,
--
Luc Hermitte
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Do you use in your plugin mappings?
I have a question for you plugin developers (but I am interested also in
a user's perspective). What do you think is the best approach to deal
with a conflicting mapping (i.e., a mapping already defined elsewhere)
in a plugin?
I currently define my plugin's mappings with <unique>, but from time to
time users report `E227: mapping already exists` errors as bugs, so I am
not sure that this is the best approach.
Btw, "do not define any mapping in a plugin" is not an answer. My
plugins already have such an option, but for some plugins providing
mappings by default is the natural choice.
Lifep.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a user's perspective). What do you think is the best approach to deal
with a conflicting mapping (i.e., a mapping already defined elsewhere)
in a plugin?
I currently define my plugin's mappings with <unique>, but from time to
time users report `E227: mapping already exists` errors as bugs, so I am
not sure that this is the best approach.
Btw, "do not define any mapping in a plugin" is not an answer. My
plugins already have such an option, but for some plugins providing
mappings by default is the natural choice.
Lifep.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Monday, September 25, 2017
Re: libvterm color palette
Grant Taylor wrote:
> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth".
> > I was assuming Leonerd took it from there, but perhaps he didn't.
> > Should be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed. It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone. (At least that's my understanding.)
>
> Perhaps my (limited) research was based on distro's (modified?) versions
> of XTerm. - Though I don't recall hard answers from the authors page
> either.
>
> I ended up installing Linux in a VM, and matching the colors from
> console (not X) output. - I then set them in my .Xdefaults file.
>
> Note: These colors differ from the colors that Microsoft used for cmd.exe.
The xterm file 256colores.h appears to contain the table.
The color cube numbers are 0X00, 0X5F, 0X87, 0XAF, 0XD7 and 0XFF.
While libvterm uses 0x00, 0x33, 0x66, 0x99, 0xCC and 0xFF.
Looks like a difference between a linear and a log scale.
The list of 24 grey colors is also different. libvterm goes from 0x00
to 0XFF, xterm from 0x08 to 0xEE.
--
hundred-and-one symptoms of being an internet addict:
194. Your business cards contain your e-mail and home page address.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth".
> > I was assuming Leonerd took it from there, but perhaps he didn't.
> > Should be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed. It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone. (At least that's my understanding.)
>
> Perhaps my (limited) research was based on distro's (modified?) versions
> of XTerm. - Though I don't recall hard answers from the authors page
> either.
>
> I ended up installing Linux in a VM, and matching the colors from
> console (not X) output. - I then set them in my .Xdefaults file.
>
> Note: These colors differ from the colors that Microsoft used for cmd.exe.
The xterm file 256colores.h appears to contain the table.
The color cube numbers are 0X00, 0X5F, 0X87, 0XAF, 0XD7 and 0XFF.
While libvterm uses 0x00, 0x33, 0x66, 0x99, 0xCC and 0xFF.
Looks like a difference between a linear and a log scale.
The list of 24 grey colors is also different. libvterm goes from 0x00
to 0XFF, xterm from 0x08 to 0xEE.
--
hundred-and-one symptoms of being an internet addict:
194. Your business cards contain your e-mail and home page address.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: libvterm color palette
On 24.09.17 14:57, 'Grant Taylor' via vim_use wrote:
> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth". I
> > was assuming Leonerd took it from there, but perhaps he didn't. Should
> > be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed. It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone. (At least that's my understanding.)
Indeed not set in stone, as they're in a file that is so easy to edit
with nothing more than vim. But the 700+ colours in
/usr/share/X11/rgb.txt have not changed intrusively over the last 3
decades, in my experience. (goldenrod, salmon, wheat, darkslategrey are
all still there). There is one colour less in
/home/src/vim/runtime/rgb.txt here, but yours may be more up to date.
The colour and filename consistency has endured across hp-ux, solaris,
and linux over those 3 decades, and I've just set foreground and
background colours in the xterm, for consistency across vim, mutt,
shell, etc. And I've not noticed any drift in yellow or darkslategrey
over that time - so stable enough for a changeless experience.
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth". I
> > was assuming Leonerd took it from there, but perhaps he didn't. Should
> > be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed. It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone. (At least that's my understanding.)
Indeed not set in stone, as they're in a file that is so easy to edit
with nothing more than vim. But the 700+ colours in
/usr/share/X11/rgb.txt have not changed intrusively over the last 3
decades, in my experience. (goldenrod, salmon, wheat, darkslategrey are
all still there). There is one colour less in
/home/src/vim/runtime/rgb.txt here, but yours may be more up to date.
The colour and filename consistency has endured across hp-ux, solaris,
and linux over those 3 decades, and I've just set foreground and
background colours in the xterm, for consistency across vim, mutt,
shell, etc. And I've not noticed any drift in yellow or darkslategrey
over that time - so stable enough for a changeless experience.
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: job_start the make command
Asynchrun is too heavy to be included in the vim just for make and grep. I prefer the vim-make-background plugin. Is there any plan to include it?
--Vincent Stone
On Friday, December 16, 2016 at 7:33:32 PM UTC+8, skywind3000 wrote:
> Shameless self promotion:
>
> https://github.com/skywind3000/asyncrun.vim
>
> an asynchronous :Make command can be easily defined by using AsyncRun:
>
> :command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>
>
> Now, :Make works just like old :make but runs in background, errors will be matched by &errorformat and displayed to quickfix window as well.
>
> Any shell command (not limited to &makeprg, &grepprg) can be execute like
>
> :AsyncRun ls -la
>
> Which is exactly the samething like old "!" command, but runs in background, errors will also be matched in quickfix window.
>
> and many misc stuff:
>
> 1. macros like "%", "%<", ... in arguments can also be expanded.
>
> 2. autocommands about make or quickfix can be triggered before and after the job , your code in .vimrc can be triggered after before starting or after job finished (eg. you may want to connect the latest cscope file after it's been successfully generated in background).
>
> 3. global variable to indicate job status, which can be used to be displayed on your statusline.
>
> 4. Compatible from 7.4.1829 to the latest version.
>
> 5. Only one self-contained source file, asyncrun.vim.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Vincent Stone
On Friday, December 16, 2016 at 7:33:32 PM UTC+8, skywind3000 wrote:
> Shameless self promotion:
>
> https://github.com/skywind3000/asyncrun.vim
>
> an asynchronous :Make command can be easily defined by using AsyncRun:
>
> :command! -bang -nargs=* -complete=file Make AsyncRun -program=make @ <args>
>
> Now, :Make works just like old :make but runs in background, errors will be matched by &errorformat and displayed to quickfix window as well.
>
> Any shell command (not limited to &makeprg, &grepprg) can be execute like
>
> :AsyncRun ls -la
>
> Which is exactly the samething like old "!" command, but runs in background, errors will also be matched in quickfix window.
>
> and many misc stuff:
>
> 1. macros like "%", "%<", ... in arguments can also be expanded.
>
> 2. autocommands about make or quickfix can be triggered before and after the job , your code in .vimrc can be triggered after before starting or after job finished (eg. you may want to connect the latest cscope file after it's been successfully generated in background).
>
> 3. global variable to indicate job status, which can be used to be displayed on your statusline.
>
> 4. Compatible from 7.4.1829 to the latest version.
>
> 5. Only one self-contained source file, asyncrun.vim.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: How to display tabs characters as ^I
@Tim, @Tony, thanks for help.
It looks to me the simplest solution is to set bellow two settings in $VIMRC file:
set listchars=
set list
Thanks for help.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It looks to me the simplest solution is to set bellow two settings in $VIMRC file:
set listchars=
set list
Thanks for help.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, September 24, 2017
Re: libvterm color palette
On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> I suppose the xterm source code must contain the "source of truth".
> I was assuming Leonerd took it from there, but perhaps he didn't.
> Should be easy to fix, but I wonder if Paul will want to take it over.
The last time I went digging for color information in XTerm, I was ...
disappointed. It seems as if XTerm's colors are somewhat fluid and were
never truly set in stone. (At least that's my understanding.)
Perhaps my (limited) research was based on distro's (modified?) versions
of XTerm. - Though I don't recall hard answers from the authors page
either.
I ended up installing Linux in a VM, and matching the colors from
console (not X) output. - I then set them in my .Xdefaults file.
Note: These colors differ from the colors that Microsoft used for cmd.exe.
--
Grant. . . .
unix || die
--
Grant. . . .
unix || die
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I suppose the xterm source code must contain the "source of truth".
> I was assuming Leonerd took it from there, but perhaps he didn't.
> Should be easy to fix, but I wonder if Paul will want to take it over.
The last time I went digging for color information in XTerm, I was ...
disappointed. It seems as if XTerm's colors are somewhat fluid and were
never truly set in stone. (At least that's my understanding.)
Perhaps my (limited) research was based on distro's (modified?) versions
of XTerm. - Though I don't recall hard answers from the authors page
either.
I ended up installing Linux in a VM, and matching the colors from
console (not X) output. - I then set them in my .Xdefaults file.
Note: These colors differ from the colors that Microsoft used for cmd.exe.
--
Grant. . . .
unix || die
--
Grant. . . .
unix || die
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: libvterm color palette
Nikolay Pavlov wrote:
> 2017-09-24 0:36 GMT+03:00 Bram Moolenaar <Bram@moolenaar.net>:
> >
> > Marcin Szamotulski wrote:
> >
> >> Is there a way to redefine color palette used by the `:terminal`
> >> (libvterm)?
> >
> > No, but you can use RGB colors ('termguicolors').
>
> I remember this issue popping up in Neovim bug tracker and it was
> found that while libvterm provides a way to alter RGB of first sixteen
> colors, what Neovim then allows to do as well (BTW, does Vim allow
> that?), rest of the palette is not only non-overridable, but uses a
> rather rough approximation that does not quite match colors used by
> xterm and adopted by other terminals.
>
> That is a single function though which maps color indexes to RGB
> colors and can easily be fixed in Vim codebase since it does not have
> libvterm as a dependency, but have it merged into its codebase
> instead.
I suppose the xterm source code must contain the "source of truth".
I was assuming Leonerd took it from there, but perhaps he didn't.
Should be easy to fix, but I wonder if Paul will want to take it over.
--
hundred-and-one symptoms of being an internet addict:
190. You quickly hand over your wallet, leather jacket, and car keys
during a mugging, then proceed to beat the crap out of your
assailant when he asks for your laptop.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> 2017-09-24 0:36 GMT+03:00 Bram Moolenaar <Bram@moolenaar.net>:
> >
> > Marcin Szamotulski wrote:
> >
> >> Is there a way to redefine color palette used by the `:terminal`
> >> (libvterm)?
> >
> > No, but you can use RGB colors ('termguicolors').
>
> I remember this issue popping up in Neovim bug tracker and it was
> found that while libvterm provides a way to alter RGB of first sixteen
> colors, what Neovim then allows to do as well (BTW, does Vim allow
> that?), rest of the palette is not only non-overridable, but uses a
> rather rough approximation that does not quite match colors used by
> xterm and adopted by other terminals.
>
> That is a single function though which maps color indexes to RGB
> colors and can easily be fixed in Vim codebase since it does not have
> libvterm as a dependency, but have it merged into its codebase
> instead.
I suppose the xterm source code must contain the "source of truth".
I was assuming Leonerd took it from there, but perhaps he didn't.
Should be easy to fix, but I wonder if Paul will want to take it over.
--
hundred-and-one symptoms of being an internet addict:
190. You quickly hand over your wallet, leather jacket, and car keys
during a mugging, then proceed to beat the crap out of your
assailant when he asks for your laptop.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: libvterm color palette
2017-09-24 0:36 GMT+03:00 Bram Moolenaar <Bram@moolenaar.net>:
>
> Marcin Szamotulski wrote:
>
>> Is there a way to redefine color palette used by the `:terminal`
>> (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').
I remember this issue popping up in Neovim bug tracker and it was
found that while libvterm provides a way to alter RGB of first sixteen
colors, what Neovim then allows to do as well (BTW, does Vim allow
that?), rest of the palette is not only non-overridable, but uses a
rather rough approximation that does not quite match colors used by
xterm and adopted by other terminals.
That is a single function though which maps color indexes to RGB
colors and can easily be fixed in Vim codebase since it does not have
libvterm as a dependency, but have it merged into its codebase
instead.
>
> --
> hundred-and-one symptoms of being an internet addict:
> 185. You order fast food over the Internet
>
> /// Bram Moolenaar -- Bram@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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>
> Marcin Szamotulski wrote:
>
>> Is there a way to redefine color palette used by the `:terminal`
>> (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').
I remember this issue popping up in Neovim bug tracker and it was
found that while libvterm provides a way to alter RGB of first sixteen
colors, what Neovim then allows to do as well (BTW, does Vim allow
that?), rest of the palette is not only non-overridable, but uses a
rather rough approximation that does not quite match colors used by
xterm and adopted by other terminals.
That is a single function though which maps color indexes to RGB
colors and can easily be fixed in Vim codebase since it does not have
libvterm as a dependency, but have it merged into its codebase
instead.
>
> --
> hundred-and-one symptoms of being an internet addict:
> 185. You order fast food over the Internet
>
> /// Bram Moolenaar -- Bram@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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: libvterm color palette
Check out colorcoke[0] (for a user interface) and Term-ExtendedColor-Xresources[1] for how you can redefine all terminal colors.
Pretty picture: http://devel.japh.se/App-Colorcoke/next2.png
On Sat, Sep 23, 2017 at 11:50 PM, Marcin Szamotulski <mszamot@gmail.com> wrote:
On 23:36 Sat 23 Sep , Bram Moolenaar wrote:
>
> Marcin Szamotulski wrote:
>
> > Is there a way to redefine color palette used by the `:terminal`
> > (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').
I am using termguicolors and the forground and background colors are
right. The other colors just do not match, I will set them in my
zsh theme then.
Thanks,
Marcin
--
--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Saturday, September 23, 2017
Re: libvterm color palette
On 23:36 Sat 23 Sep , Bram Moolenaar wrote:
>
> Marcin Szamotulski wrote:
>
> > Is there a way to redefine color palette used by the `:terminal`
> > (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').
I am using termguicolors and the forground and background colors are
right. The other colors just do not match, I will set them in my
zsh theme then.
Thanks,
Marcin
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>
> Marcin Szamotulski wrote:
>
> > Is there a way to redefine color palette used by the `:terminal`
> > (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').
I am using termguicolors and the forground and background colors are
right. The other colors just do not match, I will set them in my
zsh theme then.
Thanks,
Marcin
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: libvterm color palette
Marcin Szamotulski wrote:
> Is there a way to redefine color palette used by the `:terminal`
> (libvterm)?
No, but you can use RGB colors ('termguicolors').
--
hundred-and-one symptoms of being an internet addict:
185. You order fast food over the Internet
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Is there a way to redefine color palette used by the `:terminal`
> (libvterm)?
No, but you can use RGB colors ('termguicolors').
--
hundred-and-one symptoms of being an internet addict:
185. You order fast food over the Internet
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
libvterm color palette
Hello vim_use,
Is there a way to redefine color palette used by the `:terminal`
(libvterm)?
Best regards,
Marcin
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is there a way to redefine color palette used by the `:terminal`
(libvterm)?
Best regards,
Marcin
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thursday, September 21, 2017
Re: User-defined tabulations
On Wednesday, September 20, 2017 at 7:26:33 AM UTC+2, Christian Brabandt wrote:
> On Di, 19 Sep 2017, Mikhail V wrote:
>
> > Is there in gVIM (I am gVIM user) a possibility to define
> > different tabulations widths in single file?
> >
> > Like in a DTP software e.g. Indesign or Word,
> > I can set custom tabulations for any paragraph and they
> > are stored within a file.
> >
> > Seems that the answer is no :( But maybe some work
> > on this was done or proposed? I am almost sure this
> > have been proposed or discussed at some time.
> > I have noticed that there is similar functionality in VIM
> > like markers, that are stored separately in side files.
> > In theory it could save the tabulation setups in similar manner?
> >
> > I think also that it is not simple because tab char is used for
> > logical indentation in some languages and not only for column separation,
> > and these setups must not interfer with each other.
> > So it is sort of contents-dependent.
> >
> > To be clear, I am not interestd in solutions which insert
> > spaces to align things. I ask about tabulations, i.e. setup of
> > column coordinates for individual lines, which
> > are _one_ tab char per column in a file.
>
> There is the vartabs patch, that has been floating around for ten years
> or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
> update it to the latest code every now and then:
> https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops
>
> Christian
> --
> Letzte Worte eines Sprengmeisters:
> "Was'n das für'n Draht?"
Interesting, so my intuition was not false.
So in ten years were there user tests or some feedbacks?
It is very intriguing how it could work with
Python contents, like for example such lines,
(I put --> as a tab char here to make it visible)
-->-->var1 = -->1
-->-->var2 = -->2
-->-->var3 = -->3
Does it display widths regardless of contents/file type, ie, just starting with the first tab char on a line?
If it could apply the tabulation setup bypassing the logical indentation (loops, defs, ifs) then I could input tab-separated contents everywhere without additional tabulation resetting.
I doubt though it is so easy to programm such feature,
unless Python (and Vim) will adopt another character for logical indent.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> On Di, 19 Sep 2017, Mikhail V wrote:
>
> > Is there in gVIM (I am gVIM user) a possibility to define
> > different tabulations widths in single file?
> >
> > Like in a DTP software e.g. Indesign or Word,
> > I can set custom tabulations for any paragraph and they
> > are stored within a file.
> >
> > Seems that the answer is no :( But maybe some work
> > on this was done or proposed? I am almost sure this
> > have been proposed or discussed at some time.
> > I have noticed that there is similar functionality in VIM
> > like markers, that are stored separately in side files.
> > In theory it could save the tabulation setups in similar manner?
> >
> > I think also that it is not simple because tab char is used for
> > logical indentation in some languages and not only for column separation,
> > and these setups must not interfer with each other.
> > So it is sort of contents-dependent.
> >
> > To be clear, I am not interestd in solutions which insert
> > spaces to align things. I ask about tabulations, i.e. setup of
> > column coordinates for individual lines, which
> > are _one_ tab char per column in a file.
>
> There is the vartabs patch, that has been floating around for ten years
> or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
> update it to the latest code every now and then:
> https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops
>
> Christian
> --
> Letzte Worte eines Sprengmeisters:
> "Was'n das für'n Draht?"
Interesting, so my intuition was not false.
So in ten years were there user tests or some feedbacks?
It is very intriguing how it could work with
Python contents, like for example such lines,
(I put --> as a tab char here to make it visible)
-->-->var1 = -->1
-->-->var2 = -->2
-->-->var3 = -->3
Does it display widths regardless of contents/file type, ie, just starting with the first tab char on a line?
If it could apply the tabulation setup bypassing the logical indentation (loops, defs, ifs) then I could input tab-separated contents everywhere without additional tabulation resetting.
I doubt though it is so easy to programm such feature,
unless Python (and Vim) will adopt another character for logical indent.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: :terminal command in Vim 8
2017-09-21 22:16 GMT+02:00, Bram Moolenaar <Bram@moolenaar.net>:
>
> Marco Restelli wrote:
>
>> Dear all,
>> I am experimenting with the :terminal command in Vim 8 after
>> reading about it on this list. The feature is great!
>>
>> I have a couple of questions about it:
>>
>> 1) to enter Terminal-Normal mode I would like to use <ESC> instead of
>> the combination CTRL-W N . I see I can use termkey to define
>> something else as CTRL-W but it would still a combination of two
>> keys. What I would like is using just plain <ESC>
>
> tnoremap <Esc> <C-W>N
Yes, thanks!
>> 2) I would like to automatically set it
>> setlocal bufhidden=hide
>> for each terminal. How could I do this?
>
> This doesn't work very well yet. I'll look into triggering BufWinEnter
> after setting 'buftype'. Once that is done then this will work:
>
> au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide |
> endif
OK.
Thank you,
Marco
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>
> Marco Restelli wrote:
>
>> Dear all,
>> I am experimenting with the :terminal command in Vim 8 after
>> reading about it on this list. The feature is great!
>>
>> I have a couple of questions about it:
>>
>> 1) to enter Terminal-Normal mode I would like to use <ESC> instead of
>> the combination CTRL-W N . I see I can use termkey to define
>> something else as CTRL-W but it would still a combination of two
>> keys. What I would like is using just plain <ESC>
>
> tnoremap <Esc> <C-W>N
Yes, thanks!
>> 2) I would like to automatically set it
>> setlocal bufhidden=hide
>> for each terminal. How could I do this?
>
> This doesn't work very well yet. I'll look into triggering BufWinEnter
> after setting 'buftype'. Once that is done then this will work:
>
> au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide |
> endif
OK.
Thank you,
Marco
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: :terminal command in Vim 8
Marco Restelli wrote:
> Dear all,
> I am experimenting with the :terminal command in Vim 8 after
> reading about it on this list. The feature is great!
>
> I have a couple of questions about it:
>
> 1) to enter Terminal-Normal mode I would like to use <ESC> instead of
> the combination CTRL-W N . I see I can use termkey to define
> something else as CTRL-W but it would still a combination of two
> keys. What I would like is using just plain <ESC>
tnoremap <Esc> <C-W>N
> 2) I would like to automatically set
> setlocal bufhidden=hide
> for each terminal. How could I do this?
This doesn't work very well yet. I'll look into triggering BufWinEnter
after setting 'buftype'. Once that is done then this will work:
au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide | endif
--
hundred-and-one symptoms of being an internet addict:
169. You hire a housekeeper for your home page.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Dear all,
> I am experimenting with the :terminal command in Vim 8 after
> reading about it on this list. The feature is great!
>
> I have a couple of questions about it:
>
> 1) to enter Terminal-Normal mode I would like to use <ESC> instead of
> the combination CTRL-W N . I see I can use termkey to define
> something else as CTRL-W but it would still a combination of two
> keys. What I would like is using just plain <ESC>
tnoremap <Esc> <C-W>N
> 2) I would like to automatically set
> setlocal bufhidden=hide
> for each terminal. How could I do this?
This doesn't work very well yet. I'll look into triggering BufWinEnter
after setting 'buftype'. Once that is done then this will work:
au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide | endif
--
hundred-and-one symptoms of being an internet addict:
169. You hire a housekeeper for your home page.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: how to quickly change block data order
On 2017-09-21 08:08, Gary Johnson wrote:
> Get rid of the indentation of the first line:
>
> gg0dw
Or either of the following
gg<G
:%le
> :set fo=
> :set tw=39
> gggqG
If you prefer to do it with standard *nix tools outside of vim, you
can use
sed 's/^\s*//' in.txt | fmt -w 40 > out.txt
The `sed` strips off the leading whitespace while `fmt` does the
heavy lifting/reformatting.
-tim
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Get rid of the indentation of the first line:
>
> gg0dw
Or either of the following
gg<G
:%le
> :set fo=
> :set tw=39
> gggqG
If you prefer to do it with standard *nix tools outside of vim, you
can use
sed 's/^\s*//' in.txt | fmt -w 40 > out.txt
The `sed` strips off the leading whitespace while `fmt` does the
heavy lifting/reformatting.
-tim
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: how to quickly change block data order
On 2017-09-21, Sand Glass wrote:
> I have the following situation. I want to change it
> ####################
> b390 62b3 9062 b390 61b2
> 8f61 b28e 5fb2 8d5d b18c 5aaf 8955 ad86
> 50ab 834a a97f 45a7 7c3f a579 3aa3 7635
> a174 30a0 722d 9e6f 2a9e 6e27 9d6c 249c
> 6b23 9b6b 219b 6a20 9b69 1f9b 681f 9a68
> 1e9a 681d 9a68 1d9a 681d 9a67 1d99 671d
> 9967 1d9a 671d 9a68 1d9a 681d 9a68 1d9a
> 681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
> 1d9a 681d 9a68 1d9a 681d 9a68 1d9a 681d
> bda5 8dbd a58d
> ####################
> to
> ####################
> b390 62b3 9062 b390 61b2 8f61 b28e 5fb2
> 8d5d b18c 5aaf 8955 ad86 50ab 834a a97f
> 45a7 7c3f a579 3aa3 7635 a174 30a0 722d
> 9e6f 2a9e 6e27 9d6c 249c 6b23 9b6b 219b
> 6a20 9b69 1f9b 681f 9a68 1e9a 681d 9a68
> 1d9a 681d 9a67 1d99 671d 9967 1d9a 671d
> 9a68 1d9a 681d 9a68 1d9a 681d 9a68 1d9a
> 681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
> 1d9a 681d 9a68 1d9a 681d bda5 8dbd a58d
> ####################
> Accually there are many lines (ten thousand more) data need to
> change their order. How can I do it?
It appears that you want to change the formatting of those lines,
not their order. One way to do that is the following, which assumes
for simplicity that there is nothing in the buffer but your data.
Get rid of the indentation of the first line:
gg0dw
Clear any 'formatoptions':
:set fo=
Set the 'textwidth' to the width of your data:
:set tw=39
Fill all the lines to that 'textwidth':
gggqG
See also:
:help gq
Regards,
Gary
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I have the following situation. I want to change it
> ####################
> b390 62b3 9062 b390 61b2
> 8f61 b28e 5fb2 8d5d b18c 5aaf 8955 ad86
> 50ab 834a a97f 45a7 7c3f a579 3aa3 7635
> a174 30a0 722d 9e6f 2a9e 6e27 9d6c 249c
> 6b23 9b6b 219b 6a20 9b69 1f9b 681f 9a68
> 1e9a 681d 9a68 1d9a 681d 9a67 1d99 671d
> 9967 1d9a 671d 9a68 1d9a 681d 9a68 1d9a
> 681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
> 1d9a 681d 9a68 1d9a 681d 9a68 1d9a 681d
> bda5 8dbd a58d
> ####################
> to
> ####################
> b390 62b3 9062 b390 61b2 8f61 b28e 5fb2
> 8d5d b18c 5aaf 8955 ad86 50ab 834a a97f
> 45a7 7c3f a579 3aa3 7635 a174 30a0 722d
> 9e6f 2a9e 6e27 9d6c 249c 6b23 9b6b 219b
> 6a20 9b69 1f9b 681f 9a68 1e9a 681d 9a68
> 1d9a 681d 9a67 1d99 671d 9967 1d9a 671d
> 9a68 1d9a 681d 9a68 1d9a 681d 9a68 1d9a
> 681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
> 1d9a 681d 9a68 1d9a 681d bda5 8dbd a58d
> ####################
> Accually there are many lines (ten thousand more) data need to
> change their order. How can I do it?
It appears that you want to change the formatting of those lines,
not their order. One way to do that is the following, which assumes
for simplicity that there is nothing in the buffer but your data.
Get rid of the indentation of the first line:
gg0dw
Clear any 'formatoptions':
:set fo=
Set the 'textwidth' to the width of your data:
:set tw=39
Fill all the lines to that 'textwidth':
gggqG
See also:
:help gq
Regards,
Gary
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: how to quickly change block data order
> I have the following situation. I want to change it
> ####################
> b390 62b3 9062 b390 61b2
> Accually there are many lines (ten thousand more) data need to change
> their order. How can I do it?
>
It's not obvious from the example what transformation you're trying to
achieve. Have you thought of using sed, or another streaming tool, rather
than a static text editor like vim?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> ####################
> b390 62b3 9062 b390 61b2
> Accually there are many lines (ten thousand more) data need to change
> their order. How can I do it?
>
It's not obvious from the example what transformation you're trying to
achieve. Have you thought of using sed, or another streaming tool, rather
than a static text editor like vim?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
how to quickly change block data order
I have the following situation. I want to change it
####################
b390 62b3 9062 b390 61b2
8f61 b28e 5fb2 8d5d b18c 5aaf 8955 ad86
50ab 834a a97f 45a7 7c3f a579 3aa3 7635
a174 30a0 722d 9e6f 2a9e 6e27 9d6c 249c
6b23 9b6b 219b 6a20 9b69 1f9b 681f 9a68
1e9a 681d 9a68 1d9a 681d 9a67 1d99 671d
9967 1d9a 671d 9a68 1d9a 681d 9a68 1d9a
681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
1d9a 681d 9a68 1d9a 681d 9a68 1d9a 681d
bda5 8dbd a58d
####################
to
####################
b390 62b3 9062 b390 61b2 8f61 b28e 5fb2
8d5d b18c 5aaf 8955 ad86 50ab 834a a97f
45a7 7c3f a579 3aa3 7635 a174 30a0 722d
9e6f 2a9e 6e27 9d6c 249c 6b23 9b6b 219b
6a20 9b69 1f9b 681f 9a68 1e9a 681d 9a68
1d9a 681d 9a67 1d99 671d 9967 1d9a 671d
9a68 1d9a 681d 9a68 1d9a 681d 9a68 1d9a
681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
1d9a 681d 9a68 1d9a 681d bda5 8dbd a58d
####################
Accually there are many lines (ten thousand more) data need to change their order. How can I do it?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
####################
b390 62b3 9062 b390 61b2
8f61 b28e 5fb2 8d5d b18c 5aaf 8955 ad86
50ab 834a a97f 45a7 7c3f a579 3aa3 7635
a174 30a0 722d 9e6f 2a9e 6e27 9d6c 249c
6b23 9b6b 219b 6a20 9b69 1f9b 681f 9a68
1e9a 681d 9a68 1d9a 681d 9a67 1d99 671d
9967 1d9a 671d 9a68 1d9a 681d 9a68 1d9a
681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
1d9a 681d 9a68 1d9a 681d 9a68 1d9a 681d
bda5 8dbd a58d
####################
to
####################
b390 62b3 9062 b390 61b2 8f61 b28e 5fb2
8d5d b18c 5aaf 8955 ad86 50ab 834a a97f
45a7 7c3f a579 3aa3 7635 a174 30a0 722d
9e6f 2a9e 6e27 9d6c 249c 6b23 9b6b 219b
6a20 9b69 1f9b 681f 9a68 1e9a 681d 9a68
1d9a 681d 9a67 1d99 671d 9967 1d9a 671d
9a68 1d9a 681d 9a68 1d9a 681d 9a68 1d9a
681d 9a68 1d9a 681d 9a68 1d9a 681d 9a68
1d9a 681d 9a68 1d9a 681d bda5 8dbd a58d
####################
Accually there are many lines (ten thousand more) data need to change their order. How can I do it?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: How to display tabs characters as ^I
On Thu, Sep 21, 2017 at 12:59 PM, Igor Forca <igor2x@gmail.com> wrote:
> Hi,
> when I open the file which includes tabs characters I can replace tabs with some other characters if I want like using:
> :%s/^I/ /g
> To get ^I I press Control+V and then press i key.
>
> I know ^I is a symbol for tabs. But is there a way instead of horizontal spacing produced by pressing tab key to display ^I control character?
> Just like for example when Control+V and m is pressed to display carriage return character ^M
>
> So, how to display ^I (as single character) instead of horizontal spacing produced by tab key?
>
> Thanks
See :help 'list' and :help 'listchars' -- these are local options,
boolean and comma-separated string respectively
If 'list' is off, a hard tab is represented as one or more spaces
If 'list' is on and 'listchars' includes tab:xy (where x and y are any
two characters, but see ":help option-backslash") a hard tab is
represented as one x and zero or more y (see examples under |lcs-tab|)
If 'list' is on and 'listchars' does not include tab: a hard tab is shown as ^I
Best regards,
Tony.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Hi,
> when I open the file which includes tabs characters I can replace tabs with some other characters if I want like using:
> :%s/^I/ /g
> To get ^I I press Control+V and then press i key.
>
> I know ^I is a symbol for tabs. But is there a way instead of horizontal spacing produced by pressing tab key to display ^I control character?
> Just like for example when Control+V and m is pressed to display carriage return character ^M
>
> So, how to display ^I (as single character) instead of horizontal spacing produced by tab key?
>
> Thanks
See :help 'list' and :help 'listchars' -- these are local options,
boolean and comma-separated string respectively
If 'list' is off, a hard tab is represented as one or more spaces
If 'list' is on and 'listchars' includes tab:xy (where x and y are any
two characters, but see ":help option-backslash") a hard tab is
represented as one x and zero or more y (see examples under |lcs-tab|)
If 'list' is on and 'listchars' does not include tab: a hard tab is shown as ^I
Best regards,
Tony.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: How to display tabs characters as ^I
On 2017-09-21 03:59, Igor Forca wrote:
> So, how to display ^I (as single character) instead of horizontal
> spacing produced by tab key?
You want the 'list' setting:
:set list
or toggle it with
:set list!
which you can read about at
:help 'list'
-tim
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> So, how to display ^I (as single character) instead of horizontal
> spacing produced by tab key?
You want the 'list' setting:
:set list
or toggle it with
:set list!
which you can read about at
:help 'list'
-tim
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
How to display tabs characters as ^I
Hi,
when I open the file which includes tabs characters I can replace tabs with some other characters if I want like using:
:%s/^I/ /g
To get ^I I press Control+V and then press i key.
I know ^I is a symbol for tabs. But is there a way instead of horizontal spacing produced by pressing tab key to display ^I control character?
Just like for example when Control+V and m is pressed to display carriage return character ^M
So, how to display ^I (as single character) instead of horizontal spacing produced by tab key?
Thanks
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
when I open the file which includes tabs characters I can replace tabs with some other characters if I want like using:
:%s/^I/ /g
To get ^I I press Control+V and then press i key.
I know ^I is a symbol for tabs. But is there a way instead of horizontal spacing produced by pressing tab key to display ^I control character?
Just like for example when Control+V and m is pressed to display carriage return character ^M
So, how to display ^I (as single character) instead of horizontal spacing produced by tab key?
Thanks
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
:terminal command in Vim 8
Dear all,
I am experimenting with the :terminal command in Vim 8 after
reading about it on this list. The feature is great!
I have a couple of questions about it:
1) to enter Terminal-Normal mode I would like to use <ESC> instead of
the combination CTRL-W N . I see I can use termkey to define
something else as CTRL-W but it would still a combination of two
keys. What I would like is using just plain <ESC>
2) I would like to automatically set
setlocal bufhidden=hide
for each terminal. How could I do this?
Thank you!
Marco
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am experimenting with the :terminal command in Vim 8 after
reading about it on this list. The feature is great!
I have a couple of questions about it:
1) to enter Terminal-Normal mode I would like to use <ESC> instead of
the combination CTRL-W N . I see I can use termkey to define
something else as CTRL-W but it would still a combination of two
keys. What I would like is using just plain <ESC>
2) I would like to automatically set
setlocal bufhidden=hide
for each terminal. How could I do this?
Thank you!
Marco
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: clicked cword
On Sun, Sep 17, 2017 at 12:49 AM, Xavier Noria <fxn@hashref.com> wrote:
For the archives: I realized you can use <LeftMouse> in the RHS of the mapping, this is working well:nmap <silent> <A-LeftMouse> <LeftMouse>:exe 'tag ' . expand('<cword>')<CR>
Even simpler, since <LeftMouse> makes the clicked word the cword, that can be simplified leveraging existing commands. My current map is
nmap <silent> <A-LeftMouse> <LeftMouse>g<C-]>
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, September 19, 2017
Re: new tool lib conflict with gvim lib
Thanks a lot.
I launch the tool use this command '/opt/Xilinx/Vivado/2016.3/bin/vivado'. It is actually a script. And after launch the tool, in tool tcl command window, It has loaded all relative lib. So I do not need a extra wrapper alias.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I launch the tool use this command '/opt/Xilinx/Vivado/2016.3/bin/vivado'. It is actually a script. And after launch the tool, in tool tcl command window, It has loaded all relative lib. So I do not need a extra wrapper alias.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: User-defined tabulations
On Di, 19 Sep 2017, Mikhail V wrote:
> Is there in gVIM (I am gVIM user) a possibility to define
> different tabulations widths in single file?
>
> Like in a DTP software e.g. Indesign or Word,
> I can set custom tabulations for any paragraph and they
> are stored within a file.
>
> Seems that the answer is no :( But maybe some work
> on this was done or proposed? I am almost sure this
> have been proposed or discussed at some time.
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.
> In theory it could save the tabulation setups in similar manner?
>
> I think also that it is not simple because tab char is used for
> logical indentation in some languages and not only for column separation,
> and these setups must not interfer with each other.
> So it is sort of contents-dependent.
>
> To be clear, I am not interestd in solutions which insert
> spaces to align things. I ask about tabulations, i.e. setup of
> column coordinates for individual lines, which
> are _one_ tab char per column in a file.
There is the vartabs patch, that has been floating around for ten years
or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
update it to the latest code every now and then:
https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops
Christian
--
Letzte Worte eines Sprengmeisters:
"Was'n das für'n Draht?"
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Is there in gVIM (I am gVIM user) a possibility to define
> different tabulations widths in single file?
>
> Like in a DTP software e.g. Indesign or Word,
> I can set custom tabulations for any paragraph and they
> are stored within a file.
>
> Seems that the answer is no :( But maybe some work
> on this was done or proposed? I am almost sure this
> have been proposed or discussed at some time.
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.
> In theory it could save the tabulation setups in similar manner?
>
> I think also that it is not simple because tab char is used for
> logical indentation in some languages and not only for column separation,
> and these setups must not interfer with each other.
> So it is sort of contents-dependent.
>
> To be clear, I am not interestd in solutions which insert
> spaces to align things. I ask about tabulations, i.e. setup of
> column coordinates for individual lines, which
> are _one_ tab char per column in a file.
There is the vartabs patch, that has been floating around for ten years
or so. Unfortunately, it hasn't been merged yet. I'll keep it around and
update it to the latest code every now and then:
https://github.com/chrisbra/vim-mq-patches/blob/master/var_tabstops
Christian
--
Letzte Worte eines Sprengmeisters:
"Was'n das für'n Draht?"
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Intel HEX files ?
Hi,
while programming the flash memmory of microcontrollers I have
to edit Intel HEXfiles (https://en.wikipedia.org/wiki/Intel_HEX).
Is any addon/plugin known, which eases this task?
Thank you very much in advance for any help!
Cheers
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
while programming the flash memmory of microcontrollers I have
to edit Intel HEXfiles (https://en.wikipedia.org/wiki/Intel_HEX).
Is any addon/plugin known, which eases this task?
Thank you very much in advance for any help!
Cheers
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: User-defined tabulations
On 09/19/2017 01:37 PM, Mikhail V wrote:
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.
Are you referring to per file a-z marks / per instance A-Z marks? Which
can be stored in viminfo files?
--
Grant. . . .
unix || die
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I have noticed that there is similar functionality in VIM
> like markers, that are stored separately in side files.
Are you referring to per file a-z marks / per instance A-Z marks? Which
can be stored in viminfo files?
--
Grant. . . .
unix || die
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
q: in mapping not invoking commandline window, only the command line
Here is a mapping using q: that works, copies cursor WORD into @" and uses it to build a substitute command in command line window, ends by waiting for user to type a character the cursor should move back to.
nmap <F6>W yiWq:i%s/\<^R "\>/^R "/g^[ F
Note ^U ^R ^[ ^M are all the ctrl-v ctrl-? form
Here is an adaptation of the above to capture 2 or more WORDs at a time
nmap <F6>n : ^Ulet @n=v:count^M@nyWq:i%s/\<\(^R "\)\>//ge^[ T>a
The mapping works as expected thru @nyW, but then fails because q: does not activate the command line window as expected, apparently the q is ignored and the : then fires up the command line instead, resulting in E488 Trailing characters. If one removes the %s... from the right hand end the mapping ends by typing :i in the command line.
--
-- nmap <F6>W yiWq:i%s/\<^R "\>/^R "/g^[ F
Note ^U ^R ^[ ^M are all the ctrl-v ctrl-? form
Here is an adaptation of the above to capture 2 or more WORDs at a time
nmap <F6>n : ^Ulet @n=v:count^M@nyWq:i%s/\<\(^R "\)\>//ge^[ T>a
The mapping works as expected thru @nyW, but then fails because q: does not activate the command line window as expected, apparently the q is ignored and the : then fires up the command line instead, resulting in E488 Trailing characters. If one removes the %s... from the right hand end the mapping ends by typing :i in the command line.
--
Graham Lawrence
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
User-defined tabulations
Is there in gVIM (I am gVIM user) a possibility to define
different tabulations widths in single file?
Like in a DTP software e.g. Indesign or Word,
I can set custom tabulations for any paragraph and they
are stored within a file.
Seems that the answer is no :( But maybe some work
on this was done or proposed? I am almost sure this
have been proposed or discussed at some time.
I have noticed that there is similar functionality in VIM
like markers, that are stored separately in side files.
In theory it could save the tabulation setups in similar manner?
I think also that it is not simple because tab char is used for
logical indentation in some languages and not only for column separation,
and these setups must not interfer with each other.
So it is sort of contents-dependent.
To be clear, I am not interestd in solutions which insert
spaces to align things. I ask about tabulations, i.e. setup of
column coordinates for individual lines, which
are _one_ tab char per column in a file.
Mikhail
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
different tabulations widths in single file?
Like in a DTP software e.g. Indesign or Word,
I can set custom tabulations for any paragraph and they
are stored within a file.
Seems that the answer is no :( But maybe some work
on this was done or proposed? I am almost sure this
have been proposed or discussed at some time.
I have noticed that there is similar functionality in VIM
like markers, that are stored separately in side files.
In theory it could save the tabulation setups in similar manner?
I think also that it is not simple because tab char is used for
logical indentation in some languages and not only for column separation,
and these setups must not interfer with each other.
So it is sort of contents-dependent.
To be clear, I am not interestd in solutions which insert
spaces to align things. I ask about tabulations, i.e. setup of
column coordinates for individual lines, which
are _one_ tab char per column in a file.
Mikhail
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Set scrollbind and syncbind on command line of vim invocation
On Di, 19 Sep 2017, Keith Christian wrote:
> Ben,
>
> Thanks for responding.
>
> That command line loads both files as mine does but displays an error.
> Not much documentation about the syncbind option/command in Vim's
> docs.
>
> Here is the error I see when running the command (I added -O to
> achieve loading both 1.txt and 2.txt.)
>
> vi -O +"windo set scb syncbind" 1.txt 2.txt
>
> "2.txt" 58L, 2374C
> Error detected while processing command line:
> E518: Unknown option: syncbind
> E518: Unknown option: syncbind
Well the error says it all, there is no such option. I guess you are
looking for the cursorbind option?
Christian
--
Unser Barometer hängt 1m hoch. Dieses Tief heute ist aber so tief, daß
es da nicht mehr rankommt.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Ben,
>
> Thanks for responding.
>
> That command line loads both files as mine does but displays an error.
> Not much documentation about the syncbind option/command in Vim's
> docs.
>
> Here is the error I see when running the command (I added -O to
> achieve loading both 1.txt and 2.txt.)
>
> vi -O +"windo set scb syncbind" 1.txt 2.txt
>
> "2.txt" 58L, 2374C
> Error detected while processing command line:
> E518: Unknown option: syncbind
> E518: Unknown option: syncbind
Well the error says it all, there is no such option. I guess you are
looking for the cursorbind option?
Christian
--
Unser Barometer hängt 1m hoch. Dieses Tief heute ist aber so tief, daß
es da nicht mehr rankommt.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Set scrollbind and syncbind on command line of vim invocation
Ben,
Thanks for responding.
That command line loads both files as mine does but displays an error.
Not much documentation about the syncbind option/command in Vim's
docs.
Here is the error I see when running the command (I added -O to
achieve loading both 1.txt and 2.txt.)
vi -O +"windo set scb syncbind" 1.txt 2.txt
"2.txt" 58L, 2374C
Error detected while processing command line:
E518: Unknown option: syncbind
E518: Unknown option: syncbind
Keith
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for responding.
That command line loads both files as mine does but displays an error.
Not much documentation about the syncbind option/command in Vim's
docs.
Here is the error I see when running the command (I added -O to
achieve loading both 1.txt and 2.txt.)
vi -O +"windo set scb syncbind" 1.txt 2.txt
"2.txt" 58L, 2374C
Error detected while processing command line:
E518: Unknown option: syncbind
E518: Unknown option: syncbind
Keith
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: new tool lib conflict with gvim lib
On Di, 19 Sep 2017, Sand Glass wrote:
> Can I tempory add the xilinx LD_LIBRARY_PATH when launch xilinx tool, after I launched the tool, I release the xilinx LD_LIBRARY_PATH ?
Yes, that's what Nicolai told you. Either call your tool like this:
LD_LIBRARY_PATH=/foobar my_tool
or create a wrapper script or alias, that does something similar
However, I believe this does not work if your tool is itself a wrapper
script around some other binaries.
Best,
Christian
--
Ist mein Fleisch willig, kann Dein Geist noch so schwach sein.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Can I tempory add the xilinx LD_LIBRARY_PATH when launch xilinx tool, after I launched the tool, I release the xilinx LD_LIBRARY_PATH ?
Yes, that's what Nicolai told you. Either call your tool like this:
LD_LIBRARY_PATH=/foobar my_tool
or create a wrapper script or alias, that does something similar
However, I believe this does not work if your tool is itself a wrapper
script around some other binaries.
Best,
Christian
--
Ist mein Fleisch willig, kann Dein Geist noch so schwach sein.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: new tool lib conflict with gvim lib
Can I tempory add the xilinx LD_LIBRARY_PATH when launch xilinx tool, after I launched the tool, I release the xilinx LD_LIBRARY_PATH ?
--
--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Monday, September 18, 2017
Re: Vim under Windows 10 reports files as "read-only"
On Mon, Sep 18, 2017 at 10:08 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:
> On Monday, September 18, 2017 at 7:51:44 AM UTC-5, Karthick wrote:
>> Hello folks,
>>
>> I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
>> last few days, looks like there was an OS update that changed how
>> files in the 'Documents' folder are handled.
>>
>> This is what I see now:
>> a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
>> Similarly many other folders in C:\ work perfectly fine as well.
>> b. However, as far as I can see, ALL files in my 'Documents' are not
>> editable by gvim. The files open in readonly mode and trying to :w!
>> reports E212: Can't open file for writing.
>
> Perhaps it's because of the new-ish Windows 10 feature called "Controlled Folders", which prevents apps not on a whitelist from accessing your documents folder. This is intended as a ransomware protection feature. There's supposed to be a way to add apps to the whitelist, but Microsoft apps (and probably a few other common apps) are included by default.
Thanks - that was the google keyword that I needed! In my case, it was
the antivirus Bitdefender that was blocking access to the files. Once
I add gvim to the white-list, the original issue gets resolved.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> On Monday, September 18, 2017 at 7:51:44 AM UTC-5, Karthick wrote:
>> Hello folks,
>>
>> I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
>> last few days, looks like there was an OS update that changed how
>> files in the 'Documents' folder are handled.
>>
>> This is what I see now:
>> a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
>> Similarly many other folders in C:\ work perfectly fine as well.
>> b. However, as far as I can see, ALL files in my 'Documents' are not
>> editable by gvim. The files open in readonly mode and trying to :w!
>> reports E212: Can't open file for writing.
>
> Perhaps it's because of the new-ish Windows 10 feature called "Controlled Folders", which prevents apps not on a whitelist from accessing your documents folder. This is intended as a ransomware protection feature. There's supposed to be a way to add apps to the whitelist, but Microsoft apps (and probably a few other common apps) are included by default.
Thanks - that was the google keyword that I needed! In my case, it was
the antivirus Bitdefender that was blocking access to the files. Once
I add gvim to the white-list, the original issue gets resolved.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Set scrollbind and syncbind on command line of vim invocation
On Monday, September 18, 2017 at 4:59:32 PM UTC-5, Keith Christian wrote:
> Trying to load two files, 1.txt and 2.txt and set scrollbind on the
> command line with syncbind option, so the files will both scroll
> together, without setting scrollbind after the files are loaded.
>
> Tried these command lines, still have to issue :scrollbind command
> separately in each window (Ctrl-W L then :scrollbind.)
>
> Want to issue all commands on the command line beforehand.
>
>
> Doesn't work: vim -O +"set scb syncbind" 1.txt 2.txt
>
> Also doesn't work: vim -O +"set scb" +"set syncbind" 1.txt 2.txt
>
> Ideas?
>
> Thanks in advance.
>
> Keith
Try using +"windo set scb syncbind" to set on both windows with one command.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Trying to load two files, 1.txt and 2.txt and set scrollbind on the
> command line with syncbind option, so the files will both scroll
> together, without setting scrollbind after the files are loaded.
>
> Tried these command lines, still have to issue :scrollbind command
> separately in each window (Ctrl-W L then :scrollbind.)
>
> Want to issue all commands on the command line beforehand.
>
>
> Doesn't work: vim -O +"set scb syncbind" 1.txt 2.txt
>
> Also doesn't work: vim -O +"set scb" +"set syncbind" 1.txt 2.txt
>
> Ideas?
>
> Thanks in advance.
>
> Keith
Try using +"windo set scb syncbind" to set on both windows with one command.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Set scrollbind and syncbind on command line of vim invocation
Trying to load two files, 1.txt and 2.txt and set scrollbind on the
command line with syncbind option, so the files will both scroll
together, without setting scrollbind after the files are loaded.
Tried these command lines, still have to issue :scrollbind command
separately in each window (Ctrl-W L then :scrollbind.)
Want to issue all commands on the command line beforehand.
Doesn't work: vim -O +"set scb syncbind" 1.txt 2.txt
Also doesn't work: vim -O +"set scb" +"set syncbind" 1.txt 2.txt
Ideas?
Thanks in advance.
Keith
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
command line with syncbind option, so the files will both scroll
together, without setting scrollbind after the files are loaded.
Tried these command lines, still have to issue :scrollbind command
separately in each window (Ctrl-W L then :scrollbind.)
Want to issue all commands on the command line beforehand.
Doesn't work: vim -O +"set scb syncbind" 1.txt 2.txt
Also doesn't work: vim -O +"set scb" +"set syncbind" 1.txt 2.txt
Ideas?
Thanks in advance.
Keith
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Vim under Windows 10 reports files as "read-only"
On Monday, September 18, 2017 at 7:51:44 AM UTC-5, Karthick wrote:
> Hello folks,
>
> I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
> last few days, looks like there was an OS update that changed how
> files in the 'Documents' folder are handled.
>
> This is what I see now:
> a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
> Similarly many other folders in C:\ work perfectly fine as well.
> b. However, as far as I can see, ALL files in my 'Documents' are not
> editable by gvim. The files open in readonly mode and trying to :w!
> reports E212: Can't open file for writing.
Perhaps it's because of the new-ish Windows 10 feature called "Controlled Folders", which prevents apps not on a whitelist from accessing your documents folder. This is intended as a ransomware protection feature. There's supposed to be a way to add apps to the whitelist, but Microsoft apps (and probably a few other common apps) are included by default.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Hello folks,
>
> I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
> last few days, looks like there was an OS update that changed how
> files in the 'Documents' folder are handled.
>
> This is what I see now:
> a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
> Similarly many other folders in C:\ work perfectly fine as well.
> b. However, as far as I can see, ALL files in my 'Documents' are not
> editable by gvim. The files open in readonly mode and trying to :w!
> reports E212: Can't open file for writing.
Perhaps it's because of the new-ish Windows 10 feature called "Controlled Folders", which prevents apps not on a whitelist from accessing your documents folder. This is intended as a ransomware protection feature. There's supposed to be a way to add apps to the whitelist, but Microsoft apps (and probably a few other common apps) are included by default.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vim under Windows 10 reports files as "read-only"
Hello folks,
I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
last few days, looks like there was an OS update that changed how
files in the 'Documents' folder are handled.
This is what I see now:
a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
Similarly many other folders in C:\ work perfectly fine as well.
b. However, as far as I can see, ALL files in my 'Documents' are not
editable by gvim. The files open in readonly mode and trying to :w!
reports E212: Can't open file for writing.
c. Not sure if it matters, but the location of 'Documents' has been
moved from its OS default to D:\Karthick\Documents folder (this was
done a long time ago.. not a recent change)
d. Editing other files in D:\ also works correctly. It is only the
files in the D:\Karthick\Documents that report the error
The E212 error message is issued in all the following scenarios:
a. While trying to write any existing file in 'Documents'
b. While trying to create any new file in 'Documents'
c. Starting gvim in administrative mode also gives the same error
d. Starting gvim with '-u NONE' also gives the same error
I have used gvim on this system ever since 8.0 version came - and the
errors above are very recent (3 - 4 days). So naturally, the suspect
was that an OS update broke something.. For reference, the OS
installed the following:
1. KB4038788 - https://support.microsoft.com/en-in/help/4038788/windows-10-update-kb4038788
2. KB4038806 - https://support.microsoft.com/en-in/help/4038806/security-update-for-adobe-flash-player-sep-12-2017
3. KB4011069 - https://support.microsoft.com/en-us/help/4011069/descriptionofthesecurityupdateforpowerpoint2013september12-2017
4. KB4011103 - https://support.microsoft.com/en-us/help/20170912/security-update-deployment-information-september-12-2017
5. KB4011108 - https://support.microsoft.com/en-us/help/4011108/descriptionofthesecurityupdateforexcel2013september12-2017
6. KB4011090 - https://support.microsoft.com/en-us/help/4011090/descriptionofthesecurityupdateforoutlook2013september12-2017
7. KB3213564 - https://support.microsoft.com/en-us/help/3213564/descriptionofthesecurityupdateforoffice2013september12-2017
8. KB4011107 - https://support.microsoft.com/en-ie/help/4011107/description-of-the-security-update-for-skype-for-business-2015-lync-20
But the funny thing is, I'm able to edit the files in 'Documents' with
all other applications - like MS Word. The same text files that gvim
error'd out were editable by Notepad. I checked an image file with
gimp (as a non-MS application) - that worked normally as well with no
error reported by gimp (and trying to write the same image file via
gvim gave the E212 error).
I tried gvim reinstall after downloading the self-installer again - no
change in behavior.
Any clues/hints?
- Karthick
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have Gvim 8.0 installed on a Windows 10 machine. Sometime in the
last few days, looks like there was an OS update that changed how
files in the 'Documents' folder are handled.
This is what I see now:
a. Editing files in, say C:\Windows\Temp\temp.txt works fine.
Similarly many other folders in C:\ work perfectly fine as well.
b. However, as far as I can see, ALL files in my 'Documents' are not
editable by gvim. The files open in readonly mode and trying to :w!
reports E212: Can't open file for writing.
c. Not sure if it matters, but the location of 'Documents' has been
moved from its OS default to D:\Karthick\Documents folder (this was
done a long time ago.. not a recent change)
d. Editing other files in D:\ also works correctly. It is only the
files in the D:\Karthick\Documents that report the error
The E212 error message is issued in all the following scenarios:
a. While trying to write any existing file in 'Documents'
b. While trying to create any new file in 'Documents'
c. Starting gvim in administrative mode also gives the same error
d. Starting gvim with '-u NONE' also gives the same error
I have used gvim on this system ever since 8.0 version came - and the
errors above are very recent (3 - 4 days). So naturally, the suspect
was that an OS update broke something.. For reference, the OS
installed the following:
1. KB4038788 - https://support.microsoft.com/en-in/help/4038788/windows-10-update-kb4038788
2. KB4038806 - https://support.microsoft.com/en-in/help/4038806/security-update-for-adobe-flash-player-sep-12-2017
3. KB4011069 - https://support.microsoft.com/en-us/help/4011069/descriptionofthesecurityupdateforpowerpoint2013september12-2017
4. KB4011103 - https://support.microsoft.com/en-us/help/20170912/security-update-deployment-information-september-12-2017
5. KB4011108 - https://support.microsoft.com/en-us/help/4011108/descriptionofthesecurityupdateforexcel2013september12-2017
6. KB4011090 - https://support.microsoft.com/en-us/help/4011090/descriptionofthesecurityupdateforoutlook2013september12-2017
7. KB3213564 - https://support.microsoft.com/en-us/help/3213564/descriptionofthesecurityupdateforoffice2013september12-2017
8. KB4011107 - https://support.microsoft.com/en-ie/help/4011107/description-of-the-security-update-for-skype-for-business-2015-lync-20
But the funny thing is, I'm able to edit the files in 'Documents' with
all other applications - like MS Word. The same text files that gvim
error'd out were editable by Notepad. I checked an image file with
gimp (as a non-MS application) - that worked normally as well with no
error reported by gimp (and trying to write the same image file via
gvim gave the E212 error).
I tried gvim reinstall after downloading the self-installer again - no
change in behavior.
Any clues/hints?
- Karthick
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: new tool lib conflict with gvim lib
2017-09-18 2:50 GMT+03:00 Sand Glass <youngluoyang@gmail.com>:
> I install a new tool, and I export the LD lib.
> ########
> export LD_LIBRARY_PATH="/opt/Xilinx/Vivado/2016.3/lib/lnx64.o:"$LD_LIBRARY_PATH
> ########
>
> But my gvim cannot launch.
> ########
> /usr/bin/gvim: /opt/Xilinx/Vivado/2016.3/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
> ########
>
> My gvim linked lib is replaced by Xilinx lib.
> So Xilinx tool can not run with gvim at the same time. Now I split the .bashrc file as two. one basic env include gvim(.bashrc_basic), another only include xilinx env(.bashrc_xil). When I run xilinx tool, I open a new cmd window, and source .bashrc_xil, this window only run xilinx tool. The action can solve my problem.
>
> Is there another way makes me run xilinx tool and gvim the same time in same cmd window?
Create a wrapper function/alias/script around your tool which will run
LD_LIBRARY_PATH=/opt/Xilinx/Vivado/2014.3/lib your-xilinx-tool
, e.g. like adding
alias your-xilinx-tool="LD_LIBRARY_PATH=/opt/Xilinx/Vivado/2014.3/lib
your-xilinx-tool"
to the bashrc.
Given the nature of the message you are seeing it is extremely bad
idea to run *anything*, but xilinx tool with that LD_LIBRARY_PATH:
given that they override at least some system shared libraries any
application using overridden libraries may malfunction, not only gvim,
and possibly not only by refusing to work at all.
And I would suggest to contact whoever packaged xilinx tools, I have
seen software like this (coming with their own libs) placed in /opt
and corresponding packages *already come with a wrapper script* which
do exactly that (plus sometimes with more modifications to environment
and/or argument list) without requiring user to modify environment on
their own. But first search your xilinx package for preexisting
wrappers, maybe you are using what you are not supposed to use
directly.
>
> --
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> I install a new tool, and I export the LD lib.
> ########
> export LD_LIBRARY_PATH="/opt/Xilinx/Vivado/2016.3/lib/lnx64.o:"$LD_LIBRARY_PATH
> ########
>
> But my gvim cannot launch.
> ########
> /usr/bin/gvim: /opt/Xilinx/Vivado/2016.3/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
> ########
>
> My gvim linked lib is replaced by Xilinx lib.
> So Xilinx tool can not run with gvim at the same time. Now I split the .bashrc file as two. one basic env include gvim(.bashrc_basic), another only include xilinx env(.bashrc_xil). When I run xilinx tool, I open a new cmd window, and source .bashrc_xil, this window only run xilinx tool. The action can solve my problem.
>
> Is there another way makes me run xilinx tool and gvim the same time in same cmd window?
Create a wrapper function/alias/script around your tool which will run
LD_LIBRARY_PATH=/opt/Xilinx/Vivado/2014.3/lib your-xilinx-tool
, e.g. like adding
alias your-xilinx-tool="LD_LIBRARY_PATH=/opt/Xilinx/Vivado/2014.3/lib
your-xilinx-tool"
to the bashrc.
Given the nature of the message you are seeing it is extremely bad
idea to run *anything*, but xilinx tool with that LD_LIBRARY_PATH:
given that they override at least some system shared libraries any
application using overridden libraries may malfunction, not only gvim,
and possibly not only by refusing to work at all.
And I would suggest to contact whoever packaged xilinx tools, I have
seen software like this (coming with their own libs) placed in /opt
and corresponding packages *already come with a wrapper script* which
do exactly that (plus sometimes with more modifications to environment
and/or argument list) without requiring user to modify environment on
their own. But first search your xilinx package for preexisting
wrappers, maybe you are using what you are not supposed to use
directly.
>
> --
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, September 17, 2017
new tool lib conflict with gvim lib
I install a new tool, and I export the LD lib.
########
export LD_LIBRARY_PATH="/opt/Xilinx/Vivado/2016.3/lib/lnx64.o:"$LD_LIBRARY_PATH
########
But my gvim cannot launch.
########
/usr/bin/gvim: /opt/Xilinx/Vivado/2016.3/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
########
My gvim linked lib is replaced by Xilinx lib.
So Xilinx tool can not run with gvim at the same time. Now I split the .bashrc file as two. one basic env include gvim(.bashrc_basic), another only include xilinx env(.bashrc_xil). When I run xilinx tool, I open a new cmd window, and source .bashrc_xil, this window only run xilinx tool. The action can solve my problem.
Is there another way makes me run xilinx tool and gvim the same time in same cmd window?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
########
export LD_LIBRARY_PATH="/opt/Xilinx/Vivado/2016.3/lib/lnx64.o:"$LD_LIBRARY_PATH
########
But my gvim cannot launch.
########
/usr/bin/gvim: /opt/Xilinx/Vivado/2016.3/lib/lnx64.o/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)
########
My gvim linked lib is replaced by Xilinx lib.
So Xilinx tool can not run with gvim at the same time. Now I split the .bashrc file as two. one basic env include gvim(.bashrc_basic), another only include xilinx env(.bashrc_xil). When I run xilinx tool, I open a new cmd window, and source .bashrc_xil, this window only run xilinx tool. The action can solve my problem.
Is there another way makes me run xilinx tool and gvim the same time in same cmd window?
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Indentation of line continuations in C++ braced initializer lists
On 17.09.17 03:33, Antony Lee wrote:
> However, vim is by default unable to recognize a C++
> braced-initializer list, which effectively have similar semantics as
> parentheses in a function call; it will indent
> // Case 3: oops, 2-space indent, but 4 would be preferred.
> some_type{
> arg1,
> arg2};
...
> In fact it "should" be easy to distinguish Case 1 from Case 3, as Case
> 1 always (AFAICT?) has a closing parenthesis just before the opening
> brace (excluding whitespace) (... and you may also want to check
> whether the word before the previous word is
> struct/class/union/namespace).
If you'd like all that, then it's DIY time, I suspect: :h indentexpr
Existing tweaking within braces is limited: :h cino-e , :h cino-^
As :h C-indenting says: "Vim is not a C compiler: it does not recognize
all syntax"
Admittedly, my vim version is not the very latest.
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> However, vim is by default unable to recognize a C++
> braced-initializer list, which effectively have similar semantics as
> parentheses in a function call; it will indent
> // Case 3: oops, 2-space indent, but 4 would be preferred.
> some_type{
> arg1,
> arg2};
...
> In fact it "should" be easy to distinguish Case 1 from Case 3, as Case
> 1 always (AFAICT?) has a closing parenthesis just before the opening
> brace (excluding whitespace) (... and you may also want to check
> whether the word before the previous word is
> struct/class/union/namespace).
If you'd like all that, then it's DIY time, I suspect: :h indentexpr
Existing tweaking within braces is limited: :h cino-e , :h cino-^
As :h C-indenting says: "Vim is not a C compiler: it does not recognize
all syntax"
Admittedly, my vim version is not the very latest.
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Indentation of line continuations in C++ braced initializer lists
Hi,
In general I'm quite happy with vim's default C(++) indentation style (or rather, together with cinoptions=+l1 (indent just by 1sw after a case:) and +=h0 (don't indent after public:)). In particular, I like the fact that argument lists are indented by 2sw (the examples below use sw=2, just as a reference):
// Case 1: 2-space indent.
if (foo) {
bar;
}
// Case 2: 4-space indent.
some_func(
arg_1,
arg_2);
However, vim is by default unable to recognize a C++ braced-initializer list, which effectively have similar semantics as parentheses in a function call; it will indent
// Case 3: oops, 2-space indent, but 4 would be preferred.
some_type{
arg1,
arg2};
probably because, well, it does not distinguish this with Case 1 (and probably because braced initializer lists are a "relatively" recent addition to C++). In fact it "should" be easy to distinguish Case 1 from Case 3, as Case 1 always (AFAICT?) has a closing parenthesis just before the opening brace (excluding whitespace) (... and you may also want to check whether the word before the previous word is struct/class/union/namespace).
Does anyone know of a setting or a plugin which would solve this issue?
Just to be clear, I am not particularly interested in plugins that shell out to clang-format and other external tools, because these are far too opinionated and rigid IMO.
Thanks!
Antony
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In general I'm quite happy with vim's default C(++) indentation style (or rather, together with cinoptions=+l1 (indent just by 1sw after a case:) and +=h0 (don't indent after public:)). In particular, I like the fact that argument lists are indented by 2sw (the examples below use sw=2, just as a reference):
// Case 1: 2-space indent.
if (foo) {
bar;
}
// Case 2: 4-space indent.
some_func(
arg_1,
arg_2);
However, vim is by default unable to recognize a C++ braced-initializer list, which effectively have similar semantics as parentheses in a function call; it will indent
// Case 3: oops, 2-space indent, but 4 would be preferred.
some_type{
arg1,
arg2};
probably because, well, it does not distinguish this with Case 1 (and probably because braced initializer lists are a "relatively" recent addition to C++). In fact it "should" be easy to distinguish Case 1 from Case 3, as Case 1 always (AFAICT?) has a closing parenthesis just before the opening brace (excluding whitespace) (... and you may also want to check whether the word before the previous word is struct/class/union/namespace).
Does anyone know of a setting or a plugin which would solve this issue?
Just to be clear, I am not particularly interested in plugins that shell out to clang-format and other external tools, because these are far too opinionated and rigid IMO.
Thanks!
Antony
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Saturday, September 16, 2017
Terminal window support : Shift+Tab is missing
Test in Windows 10
Current master branch
:term
Tab : work
Shift+Tab : don't work
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Current master branch
:term
Tab : work
Shift+Tab : don't work
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: clicked cword
For the archives: I realized you can use <LeftMouse> in the RHS of the mapping, this is working well:
nmap <silent> <A-LeftMouse> <LeftMouse>:exe 'tag ' . expand('<cword>')<CR>
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Friday, September 15, 2017
Re: Terminal and pipes
On 15/09/2017 20:43, Bram Moolenaar wrote:
>
> Lifepillar wrote:
>
>> How does one launch piped commands in Vim terminal?
>> The naïve:
>>
>> call term_start('ls | fzf')
>>
>> does not work. I guess that I should connect two jobs using
>> out_io and in_io, but is that possible?
>
> You need to do this with a shell:
>
> call term_start(['sh', '-c', 'ls | more'])
Aaah, of course! Way too simple… :)
Thanks,
Life.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>
> Lifepillar wrote:
>
>> How does one launch piped commands in Vim terminal?
>> The naïve:
>>
>> call term_start('ls | fzf')
>>
>> does not work. I guess that I should connect two jobs using
>> out_io and in_io, but is that possible?
>
> You need to do this with a shell:
>
> call term_start(['sh', '-c', 'ls | more'])
Aaah, of course! Way too simple… :)
Thanks,
Life.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: Terminal and pipes
Lifepillar wrote:
> How does one launch piped commands in Vim terminal?
> The naïve:
>
> call term_start('ls | fzf')
>
> does not work. I guess that I should connect two jobs using
> out_io and in_io, but is that possible?
You need to do this with a shell:
call term_start(['sh', '-c', 'ls | more'])
--
The difference between theory and practice, is that in theory, there
is no difference between theory and practice.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> How does one launch piped commands in Vim terminal?
> The naïve:
>
> call term_start('ls | fzf')
>
> does not work. I guess that I should connect two jobs using
> out_io and in_io, but is that possible?
You need to do this with a shell:
call term_start(['sh', '-c', 'ls | more'])
--
The difference between theory and practice, is that in theory, there
is no difference between theory and practice.
/// Bram Moolenaar -- Bram@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Posts (Atom)