On Thursday, March 9, 2017 at 4:27:02 PM UTC-3, Felipe Vieira wrote:
> Dear vim mailing list,
>
> how do I isolate vim environment?
>
> The objective is to test and develop several different plugins without interference.
>
> I don't want to mess my own vim "stable" setup.
>
> For that end a setup with its own vimrc file, own variables (for instance using a different $HOME than the one used by vim) and folders would be nice.
>
> I was trying to do this thru a bash script but could not achieve the desired goals (changing the $HOME variable and setting up vim with a different vimrc was not enough).
>
> So before diving into details/scripting/etc I would like to know if you guys have a working solution.
>
> Best,
Guys I have developed my own method. It looks robust now and allows me to isolate plugins from each other and start with a very minimal vimrc.
I'm posting here because it may be useful to others.
In order to properly initialize the plugin one may have to modify the code to copy the plugins content to the appropriate path in 'packpathdir'.
But it works great!
--
--
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, April 6, 2017
Re: execute sub command without moving cursor
Le mercredi 5 avril 2017 23:56:06 UTC+2, ZyX a écrit :
> 2017-04-05 22:21 GMT+03:00 Ni Va <nivaemail@gmail.com>:
> > Hi,
> >
> >
> > I use this kind of command but it moves my cursor pos.
> >
> >
> > silent! exe '?^BEGIN?,/^END/s/^NETWORK.*$/\="NETWORK".s:inc()." \/\/In ".s[0]." : ".s[1]/e'
> >
> >
> > Can I avoid to move cursor when I replace executing sub command ?
> > Thanks
> > niva
>
> You can restore it afterwards: use winsaveview()+winrestview().
> Otherwise you will have to emulate `:substitute` with search() and
> setline() and this is going to be way too tricky.
>
> >
> > --
> > --
> > 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.
Some post said that it is safer to effectively use
search() and
setline()
Thank you
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> 2017-04-05 22:21 GMT+03:00 Ni Va <nivaemail@gmail.com>:
> > Hi,
> >
> >
> > I use this kind of command but it moves my cursor pos.
> >
> >
> > silent! exe '?^BEGIN?,/^END/s/^NETWORK.*$/\="NETWORK".s:inc()." \/\/In ".s[0]." : ".s[1]/e'
> >
> >
> > Can I avoid to move cursor when I replace executing sub command ?
> > Thanks
> > niva
>
> You can restore it afterwards: use winsaveview()+winrestview().
> Otherwise you will have to emulate `:substitute` with search() and
> setline() and this is going to be way too tricky.
>
> >
> > --
> > --
> > 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.
Some post said that it is safer to effectively use
search() and
setline()
Thank you
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wednesday, April 5, 2017
Re: RFE: enable gvim to open a buffer or tab in a new window
> ---
> If vsplit could split the file into another window, that'd be great!
>
> But I want to be able to arrange the windows side-by-side -- maybe 1
> on each side or, rarely, maybe 2 on each side (one above another).
>
> Trying to simulate all of this in 1 window is near impossible,
> but being able to view multiple files at the same time in
> some side-by-side or one-on-top seems like a fairly basic
> desire. Right now, I have 10 different copies of gvim running,
> each with 2 files (c++ source & header) and another 4 copies
> with other work/projects in them. At times I have 6-8 gvim's
> open on my desktop each w/different files that I move between
> to analyze call paths between different modules.
>
> In this case, sometimes I want to view the header & c++ source
> side-by-side in two windows and when done, I'd like to move
> the header-file-window back into a tab of the source-file-window.
>
> When I have to make code changes in multiple windows, it is
> a hassle that I don't have the same history list in common
> so I can repeat commands in each window instead of having to type
> them, afresh, in each window.
>
> People who do development get larger screens and multiple screens
> so they can have multiple files and projects open at the same
> time.
>
> Does that help understand my use case?
>
> Thanks!
> Linda
How many windows do you need ? I've got 16 here in one frame.
Remember window size can be controlled by auto commands, i.e. automatically increase size when the cursor moves into 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.
> If vsplit could split the file into another window, that'd be great!
>
> But I want to be able to arrange the windows side-by-side -- maybe 1
> on each side or, rarely, maybe 2 on each side (one above another).
>
> Trying to simulate all of this in 1 window is near impossible,
> but being able to view multiple files at the same time in
> some side-by-side or one-on-top seems like a fairly basic
> desire. Right now, I have 10 different copies of gvim running,
> each with 2 files (c++ source & header) and another 4 copies
> with other work/projects in them. At times I have 6-8 gvim's
> open on my desktop each w/different files that I move between
> to analyze call paths between different modules.
>
> In this case, sometimes I want to view the header & c++ source
> side-by-side in two windows and when done, I'd like to move
> the header-file-window back into a tab of the source-file-window.
>
> When I have to make code changes in multiple windows, it is
> a hassle that I don't have the same history list in common
> so I can repeat commands in each window instead of having to type
> them, afresh, in each window.
>
> People who do development get larger screens and multiple screens
> so they can have multiple files and projects open at the same
> time.
>
> Does that help understand my use case?
>
> Thanks!
> Linda
How many windows do you need ? I've got 16 here in one frame.
Remember window size can be controlled by auto commands, i.e. automatically increase size when the cursor moves into 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: RFE: enable gvim to open a buffer or tab in a new window
> ---
> If vsplit could split the file into another window, that'd be great!
>
> But I want to be able to arrange the windows side-by-side -- maybe 1
> on each side or, rarely, maybe 2 on each side (one above another).
>
> Trying to simulate all of this in 1 window is near impossible,
> but being able to view multiple files at the same time in
> some side-by-side or one-on-top seems like a fairly basic
> desire. Right now, I have 10 different copies of gvim running,
> each with 2 files (c++ source & header) and another 4 copies
> with other work/projects in them. At times I have 6-8 gvim's
> open on my desktop each w/different files that I move between
> to analyze call paths between different modules.
>
> In this case, sometimes I want to view the header & c++ source
> side-by-side in two windows and when done, I'd like to move
> the header-file-window back into a tab of the source-file-window.
>
> When I have to make code changes in multiple windows, it is
> a hassle that I don't have the same history list in common
> so I can repeat commands in each window instead of having to type
> them, afresh, in each window.
>
> People who do development get larger screens and multiple screens
> so they can have multiple files and projects open at the same
> time.
>
> Does that help understand my use case?
>
> Thanks!
> Linda
How many windows do you need ? I've got 16 here in one frame.
Remember window size can be controlled by auto commands, i.e. automatically increase size when the cursor moves into 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.
> If vsplit could split the file into another window, that'd be great!
>
> But I want to be able to arrange the windows side-by-side -- maybe 1
> on each side or, rarely, maybe 2 on each side (one above another).
>
> Trying to simulate all of this in 1 window is near impossible,
> but being able to view multiple files at the same time in
> some side-by-side or one-on-top seems like a fairly basic
> desire. Right now, I have 10 different copies of gvim running,
> each with 2 files (c++ source & header) and another 4 copies
> with other work/projects in them. At times I have 6-8 gvim's
> open on my desktop each w/different files that I move between
> to analyze call paths between different modules.
>
> In this case, sometimes I want to view the header & c++ source
> side-by-side in two windows and when done, I'd like to move
> the header-file-window back into a tab of the source-file-window.
>
> When I have to make code changes in multiple windows, it is
> a hassle that I don't have the same history list in common
> so I can repeat commands in each window instead of having to type
> them, afresh, in each window.
>
> People who do development get larger screens and multiple screens
> so they can have multiple files and projects open at the same
> time.
>
> Does that help understand my use case?
>
> Thanks!
> Linda
How many windows do you need ? I've got 16 here in one frame.
Remember window size can be controlled by auto commands, i.e. automatically increase size when the cursor moves into 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: Different syntax behavior in vim 7.4
Yes, I could get the expected syntax display with vim 8.0 .
Thanks.On Wed, Apr 5, 2017 at 3:43 PM, Dominique Pellé <dominique.pelle@gmail.com> wrote:
Chandra <vchandrasri@gmail.com> wrote:
> Hello,
> I see a syntax behavior change between vim 7.4 and earlier
> version. (We are yet to update VIM version to 8.0+ in our company.)
>
> I use different syntax for lines that begin with "//" (Comments) and
> lines that begin with "//:" (embedded Perl Code). I was able to
> achieve this with earlier version of vim by specifying this in the
> syntax file,
>
> syn match embPerlCode "^\s*//:.*"
>
> and this in .gvimrc,
>
> highlight embPerlCode gui=bold guifg=maroon
>
> This works fine in version 7.2 (didn't check in 7.3). But in version
> 7.4 the behavior has changed. The embPerlCode lines are
> shown with syntax color of Comments.
>
> Is there a way to get around this and get back the previous behavior?
Using vim-8.0.543 (gtk3 gui), it works as expected for me
i.e. I see different colors for comments if I do:
$ vim -f -g \
-c 'syntax on' \
-c 'setfiletype cpp' \
-c 'syn match embPerlCode "^\s*//:.*"' \
-c 'hi embPerlCode gui=bold guifg=maroon' \
-c 'call setline(1, ["// a cpp comment", "//: an empPerlCode comment"])'
Can you double check?
If you use vim-7.2 or 7.3, you're missing a lot of
fixes and useful new features.
Dominique
--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/bO4pbg3nvoU/ .unsubscribe
To unsubscribe from this group and all its topics, 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: RFE: enable gvim to open a buffer or tab in a new window
Paul wrote:
> On Tuesday, 28 March, 2017 at 13:08:03 BST, L A Walsh wrote:
>> Just the other day, I had two files open in tabs (.cc and .h: a C++
>> source &
>> header). Instead of window switching, I wanted to change my visual
>> layout for
>> 1 pair of files to see them side-by-side (and when I was done, close
>> the 2nd
>> display leaving the 2nd file as a 2nd tab in the 1st window.
>
> Why not just :vsplit the other file into the current tab, and :quit it
> when done?
---
If vsplit could split the file into another window, that'd be great!
But I want to be able to arrange the windows side-by-side -- maybe 1
on each side or, rarely, maybe 2 on each side (one above another).
Trying to simulate all of this in 1 window is near impossible,
but being able to view multiple files at the same time in
some side-by-side or one-on-top seems like a fairly basic
desire. Right now, I have 10 different copies of gvim running,
each with 2 files (c++ source & header) and another 4 copies
with other work/projects in them. At times I have 6-8 gvim's
open on my desktop each w/different files that I move between
to analyze call paths between different modules.
In this case, sometimes I want to view the header & c++ source
side-by-side in two windows and when done, I'd like to move
the header-file-window back into a tab of the source-file-window.
When I have to make code changes in multiple windows, it is
a hassle that I don't have the same history list in common
so I can repeat commands in each window instead of having to type
them, afresh, in each window.
People who do development get larger screens and multiple screens
so they can have multiple files and projects open at the same
time.
Does that help understand my use case?
Thanks!
Linda
--
--
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 Tuesday, 28 March, 2017 at 13:08:03 BST, L A Walsh wrote:
>> Just the other day, I had two files open in tabs (.cc and .h: a C++
>> source &
>> header). Instead of window switching, I wanted to change my visual
>> layout for
>> 1 pair of files to see them side-by-side (and when I was done, close
>> the 2nd
>> display leaving the 2nd file as a 2nd tab in the 1st window.
>
> Why not just :vsplit the other file into the current tab, and :quit it
> when done?
---
If vsplit could split the file into another window, that'd be great!
But I want to be able to arrange the windows side-by-side -- maybe 1
on each side or, rarely, maybe 2 on each side (one above another).
Trying to simulate all of this in 1 window is near impossible,
but being able to view multiple files at the same time in
some side-by-side or one-on-top seems like a fairly basic
desire. Right now, I have 10 different copies of gvim running,
each with 2 files (c++ source & header) and another 4 copies
with other work/projects in them. At times I have 6-8 gvim's
open on my desktop each w/different files that I move between
to analyze call paths between different modules.
In this case, sometimes I want to view the header & c++ source
side-by-side in two windows and when done, I'd like to move
the header-file-window back into a tab of the source-file-window.
When I have to make code changes in multiple windows, it is
a hassle that I don't have the same history list in common
so I can repeat commands in each window instead of having to type
them, afresh, in each window.
People who do development get larger screens and multiple screens
so they can have multiple files and projects open at the same
time.
Does that help understand my use case?
Thanks!
Linda
--
--
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: Different syntax behavior in vim 7.4
Chandra <vchandrasri@gmail.com> wrote:
> Hello,
> I see a syntax behavior change between vim 7.4 and earlier
> version. (We are yet to update VIM version to 8.0+ in our company.)
>
> I use different syntax for lines that begin with "//" (Comments) and
> lines that begin with "//:" (embedded Perl Code). I was able to
> achieve this with earlier version of vim by specifying this in the
> syntax file,
>
> syn match embPerlCode "^\s*//:.*"
>
> and this in .gvimrc,
>
> highlight embPerlCode gui=bold guifg=maroon
>
> This works fine in version 7.2 (didn't check in 7.3). But in version
> 7.4 the behavior has changed. The embPerlCode lines are
> shown with syntax color of Comments.
>
> Is there a way to get around this and get back the previous behavior?
Using vim-8.0.543 (gtk3 gui), it works as expected for me
i.e. I see different colors for comments if I do:
$ vim -f -g \
-c 'syntax on' \
-c 'setfiletype cpp' \
-c 'syn match embPerlCode "^\s*//:.*"' \
-c 'hi embPerlCode gui=bold guifg=maroon' \
-c 'call setline(1, ["// a cpp comment", "//: an empPerlCode comment"])'
Can you double check?
If you use vim-7.2 or 7.3, you're missing a lot of
fixes and useful new features.
Dominique
--
--
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,
> I see a syntax behavior change between vim 7.4 and earlier
> version. (We are yet to update VIM version to 8.0+ in our company.)
>
> I use different syntax for lines that begin with "//" (Comments) and
> lines that begin with "//:" (embedded Perl Code). I was able to
> achieve this with earlier version of vim by specifying this in the
> syntax file,
>
> syn match embPerlCode "^\s*//:.*"
>
> and this in .gvimrc,
>
> highlight embPerlCode gui=bold guifg=maroon
>
> This works fine in version 7.2 (didn't check in 7.3). But in version
> 7.4 the behavior has changed. The embPerlCode lines are
> shown with syntax color of Comments.
>
> Is there a way to get around this and get back the previous behavior?
Using vim-8.0.543 (gtk3 gui), it works as expected for me
i.e. I see different colors for comments if I do:
$ vim -f -g \
-c 'syntax on' \
-c 'setfiletype cpp' \
-c 'syn match embPerlCode "^\s*//:.*"' \
-c 'hi embPerlCode gui=bold guifg=maroon' \
-c 'call setline(1, ["// a cpp comment", "//: an empPerlCode comment"])'
Can you double check?
If you use vim-7.2 or 7.3, you're missing a lot of
fixes and useful new features.
Dominique
--
--
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)

