On Wednesday, October 31, 2012 3:49:22 PM UTC-5, Ian Donegan wrote:
> I am trying to find a way to use pattern recognition in spell-check. At the moment, I am not even sure if that is possible, but it seems like it should be. If I want to have a url in a file with ":set spell" I have to either mark the link as correct or deal with the red hilighting. Is there any way to white-list everything that starts with "http://"? Thanks in advance.
Well, spelling integrates with syntax highlight. You could define a simple syntax to recognize the URLs and disallow spelling in that syntax region.
--
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
Thursday, November 1, 2012
Re: Strange issue with Pathogen
On 10/31/2012 02:47 PM, Some Developer wrote:
> I'm having a strange issue with Pathogen. I'm trying to keep my Vim
> configuration and plugins organised as I need to use it on several
> computers so I decided to create a git repo for it.
>
> The following is my .vim folder structure:
>
> autoload
> bundle
> vimrc_config
>
> When I symlink ~/.vimrc to ~/.vim/vimrc_config Pathogen does not load
> any plugins at all. When I copy ~/.vim/vimrc_config to ~/.vimrc on the
> other hand it works perfectly.
This is exactly how I handle the vimrc/pathogen problem, and it works
fine for me.
Have you checked the permissions for vimrc?
M
--
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
> I'm having a strange issue with Pathogen. I'm trying to keep my Vim
> configuration and plugins organised as I need to use it on several
> computers so I decided to create a git repo for it.
>
> The following is my .vim folder structure:
>
> autoload
> bundle
> vimrc_config
>
> When I symlink ~/.vimrc to ~/.vim/vimrc_config Pathogen does not load
> any plugins at all. When I copy ~/.vim/vimrc_config to ~/.vimrc on the
> other hand it works perfectly.
This is exactly how I handle the vimrc/pathogen problem, and it works
fine for me.
Have you checked the permissions for vimrc?
M
--
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
Re: 答复: 答复: how use surround.vim
Bring the conversation back to the list.
(Sorry for my failing to cc the list in the previous mail.)
On Thu, 1 Nov 2012 17:24:53 +0800, 王军 wrote:
> But how delete begin-end when use ySS- ?
Seems we cannot delete the pair in one step with surround.
(Please point it out if I am wrong.)
However you can just use dd twice instead in this particular situation.
>
> -----邮件原件-----
> 发件人: Alick Zhao [mailto:alick9188@gmail.com]
> 发送时间: 2012年11月1日 17:19
> 收件人: 王军
> 主题: Re: 答复: how use surround.vim
>
> On Thu, 1 Nov 2012 16:22:58 +0800, 王军 wrote:
>> I see its help.
>> If let g:surround_45 = "begin \r End",it can be :
>>
>> Begin GT_SI <=#`DELAY 0 ; end
>>
>> Not:
>> begin
>> GT_SI <=#`DELAY 0 ;
>> End
>
> I see letter case mismatch in your reply.
> What was your command? You need captical S (Shift+S) to make the wrap operation linewise, instead of character-wise.
>
>> Then use ySS- to achive what you want.
>>
>> See :help surround.txt for more details.
>>
>> Alick
>>
>
--
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
(Sorry for my failing to cc the list in the previous mail.)
On Thu, 1 Nov 2012 17:24:53 +0800, 王军 wrote:
> But how delete begin-end when use ySS- ?
Seems we cannot delete the pair in one step with surround.
(Please point it out if I am wrong.)
However you can just use dd twice instead in this particular situation.
>
> -----邮件原件-----
> 发件人: Alick Zhao [mailto:alick9188@gmail.com]
> 发送时间: 2012年11月1日 17:19
> 收件人: 王军
> 主题: Re: 答复: how use surround.vim
>
> On Thu, 1 Nov 2012 16:22:58 +0800, 王军 wrote:
>> I see its help.
>> If let g:surround_45 = "begin \r End",it can be :
>>
>> Begin GT_SI <=#`DELAY 0 ; end
>>
>> Not:
>> begin
>> GT_SI <=#`DELAY 0 ;
>> End
>
> I see letter case mismatch in your reply.
> What was your command? You need captical S (Shift+S) to make the wrap operation linewise, instead of character-wise.
>
>> Then use ySS- to achive what you want.
>>
>> See :help surround.txt for more details.
>>
>> Alick
>>
>
--
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
答复: how use surround.vim
I see its help.
If let g:surround_45 = "begin \r End",it can be :
Begin GT_SI <=#`DELAY 0 ; end
Not:
begin
GT_SI <=#`DELAY 0 ;
End
-----邮件原件-----
发件人: Alick Zhao [mailto:alick9188@gmail.com]
发送时间: 2012年11月1日 15:53
收件人: vim_use@googlegroups.com
抄送: wangjun850725@gmail.com
主题: Re: how use surround.vim
On Thu, 1 Nov 2012 11:00:38 +0800, 王军 wrote:
> Hi,everyone
>
> I use surround.vim.
>
> I want it can do like this:
>
>
>
> Old:
>
> GT_SI <=#`DELAY 0 ;
>
>
>
> New:
>
> begin
>
> GT_SI <=#`DELAY 0 ;
>
> End
>
>
>
> How can I do?
>
> Thank you !
>
>
After looking through the doc of surround plugin (surround.txt), I think you might want to add the following line into your .vimrc:
let g:surround_45 = "begin \r End"
Then use ySS- to achive what you want.
See :help surround.txt for more details.
Alick
--
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
If let g:surround_45 = "begin \r End",it can be :
Begin GT_SI <=#`DELAY 0 ; end
Not:
begin
GT_SI <=#`DELAY 0 ;
End
-----邮件原件-----
发件人: Alick Zhao [mailto:alick9188@gmail.com]
发送时间: 2012年11月1日 15:53
收件人: vim_use@googlegroups.com
抄送: wangjun850725@gmail.com
主题: Re: how use surround.vim
On Thu, 1 Nov 2012 11:00:38 +0800, 王军 wrote:
> Hi,everyone
>
> I use surround.vim.
>
> I want it can do like this:
>
>
>
> Old:
>
> GT_SI <=#`DELAY 0 ;
>
>
>
> New:
>
> begin
>
> GT_SI <=#`DELAY 0 ;
>
> End
>
>
>
> How can I do?
>
> Thank you !
>
>
After looking through the doc of surround plugin (surround.txt), I think you might want to add the following line into your .vimrc:
let g:surround_45 = "begin \r End"
Then use ySS- to achive what you want.
See :help surround.txt for more details.
Alick
--
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
Re: how use surround.vim
On Thu, 1 Nov 2012 11:00:38 +0800, 王军 wrote:
> Hi,everyone
>
> I use surround.vim.
>
> I want it can do like this:
>
>
>
> Old:
>
> GT_SI <=#`DELAY 0 ;
>
>
>
> New:
>
> begin
>
> GT_SI <=#`DELAY 0 ;
>
> End
>
>
>
> How can I do?
>
> Thank you !
>
>
After looking through the doc of surround plugin (surround.txt), I think
you might want to add the following line into your .vimrc:
let g:surround_45 = "begin \r End"
Then use ySS- to achive what you want.
See :help surround.txt for more details.
Alick
--
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
> Hi,everyone
>
> I use surround.vim.
>
> I want it can do like this:
>
>
>
> Old:
>
> GT_SI <=#`DELAY 0 ;
>
>
>
> New:
>
> begin
>
> GT_SI <=#`DELAY 0 ;
>
> End
>
>
>
> How can I do?
>
> Thank you !
>
>
After looking through the doc of surround plugin (surround.txt), I think
you might want to add the following line into your .vimrc:
let g:surround_45 = "begin \r End"
Then use ySS- to achive what you want.
See :help surround.txt for more details.
Alick
--
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
Re: saving code browsing history
On Wednesday, October 31, 2012 7:52:18 AM UTC-7, Ben Fritz wrote:
> On Wednesday, October 31, 2012 2:32:49 AM UTC-5, Asis Hallab wrote:
>
> > 2012/10/31 happyFace <happyface...@gmail.com>
>
> >
>
> > > I have been using vim for sometime now but I am completely new to writing
>
> > > vim plugins. I would like to write a plugin that record all the file
>
> > > locations we jump to (with tags or cscope symbols) and save them in a file.
>
> > > So that we can later review the "code browsing session" and be able to
>
> > > conveniently revisit the same tags we browsed.
>
> >
>
> >
>
> > Vim already has that feature. It's called the jumplist.
>
> > Couldn't be better explained than by Drew Neil:
>
> > http://vimcasts.org/episodes/using-the-changelist-and-jumplist/
>
> >
>
> >
>
> >
>
> > There is also a switch to make Vim save its history.
>
> > So after restarting it, you still have your old jumplist.
>
> > You can set it in your vimrc, unfortunately I can't remember it right now..
>
> >
>
>
>
> Vim saves the jumplist in the .viminfo file, if the "'" included by default in
>
> the 'viminfo' option is still present.
>
>
>
> However, the .viminfo file may not be as persistent a storage location as you
>
> might like. Additionally, according to the help only 100 jumps are stored in the
>
> list, and each window has its own jump list. The :jumps command will list out
>
> the current jump list (presumably for the current window). Potentially you could
>
> use :redir to capture and parse the output of this command and store it to a
>
> file of your choosing. I don't see any functions to get the jumplist in a
>
> script, but perhaps I just missed them.
>
>
>
> Actually, rather than parsing the output of :jumps, it is probably better to set
>
> 'viminfo' to the desired setting, use the :wviminfo command with a file
>
> argument, then restore 'viminfo'.
>
>
>
> I don't know of a better way to accomplish your task than using the jump list,
>
> even with the caveats I mention above. Hopefully 100 jumps will be sufficient
>
> for you.
Thanks guys!
:jumps is great. I struggled a bit with getting ctrl-o, ctrl-i to work. I would type those but nothing happens. I finally found a workaround without quite understanding the cause of the problem.
I use gnome terminal where I set "telnet -E dev-server-name" as a command to be automatically executed when a terminal is launched. I set that in the terminal profile.
I use -E to force telnet not to recognize any escape character, otherwise, ctrl-] will close the telnet session instead of jumping to the tag definition in a vim session. Somehow, this was causing ctrl-o, ctrl-i not to function at all.
If I set "telnet dev-server-name" instead of "telnet -E dev-server-name", then ctrl-o, ctrl-i work fine.
What makes this even more difficult to understand is that if I ssh to the development server and then telnet -E to the same server, ctrl-o, ctrl-i works fine in a vim session!
Only if I use telnet -E ** and ** I set it in the gnome terminal profile to be launched when a terminal is launched do I hit the problem of ctrl-o, ctrl-i not working in a vim session.
Anyway, I have a workaround. Just wanted to share that in case someone hits the same problem.
ES
--
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
> On Wednesday, October 31, 2012 2:32:49 AM UTC-5, Asis Hallab wrote:
>
> > 2012/10/31 happyFace <happyface...@gmail.com>
>
> >
>
> > > I have been using vim for sometime now but I am completely new to writing
>
> > > vim plugins. I would like to write a plugin that record all the file
>
> > > locations we jump to (with tags or cscope symbols) and save them in a file.
>
> > > So that we can later review the "code browsing session" and be able to
>
> > > conveniently revisit the same tags we browsed.
>
> >
>
> >
>
> > Vim already has that feature. It's called the jumplist.
>
> > Couldn't be better explained than by Drew Neil:
>
> > http://vimcasts.org/episodes/using-the-changelist-and-jumplist/
>
> >
>
> >
>
> >
>
> > There is also a switch to make Vim save its history.
>
> > So after restarting it, you still have your old jumplist.
>
> > You can set it in your vimrc, unfortunately I can't remember it right now..
>
> >
>
>
>
> Vim saves the jumplist in the .viminfo file, if the "'" included by default in
>
> the 'viminfo' option is still present.
>
>
>
> However, the .viminfo file may not be as persistent a storage location as you
>
> might like. Additionally, according to the help only 100 jumps are stored in the
>
> list, and each window has its own jump list. The :jumps command will list out
>
> the current jump list (presumably for the current window). Potentially you could
>
> use :redir to capture and parse the output of this command and store it to a
>
> file of your choosing. I don't see any functions to get the jumplist in a
>
> script, but perhaps I just missed them.
>
>
>
> Actually, rather than parsing the output of :jumps, it is probably better to set
>
> 'viminfo' to the desired setting, use the :wviminfo command with a file
>
> argument, then restore 'viminfo'.
>
>
>
> I don't know of a better way to accomplish your task than using the jump list,
>
> even with the caveats I mention above. Hopefully 100 jumps will be sufficient
>
> for you.
Thanks guys!
:jumps is great. I struggled a bit with getting ctrl-o, ctrl-i to work. I would type those but nothing happens. I finally found a workaround without quite understanding the cause of the problem.
I use gnome terminal where I set "telnet -E dev-server-name" as a command to be automatically executed when a terminal is launched. I set that in the terminal profile.
I use -E to force telnet not to recognize any escape character, otherwise, ctrl-] will close the telnet session instead of jumping to the tag definition in a vim session. Somehow, this was causing ctrl-o, ctrl-i not to function at all.
If I set "telnet dev-server-name" instead of "telnet -E dev-server-name", then ctrl-o, ctrl-i work fine.
What makes this even more difficult to understand is that if I ssh to the development server and then telnet -E to the same server, ctrl-o, ctrl-i works fine in a vim session!
Only if I use telnet -E ** and ** I set it in the gnome terminal profile to be launched when a terminal is launched do I hit the problem of ctrl-o, ctrl-i not working in a vim session.
Anyway, I have a workaround. Just wanted to share that in case someone hits the same problem.
ES
--
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
Re: What do I need to read to understand g: and s: VIM variable prefixes?
On 31/10/12 21:02, Dotan Cohen wrote:
> On Wed, Oct 31, 2012 at 9:52 PM, donothing successfully
> <donothingsuccessfully@gmail.com> wrote:
>> On 31 October 2012 19:15, Dotan Cohen <dotancohen@gmail.com> wrote:
>>> […]
>>> #include <stdio.h>
>>> int foo();
>>>
>>> int main() {
>>> int x = 42;
>>> printf("%d", x);
>>> foo();
>>> return 0;
>>> }
>>>
>>> int foo() {
>>> printf("%d", x);
>>> }
>>> […]
>> Here x is a local variable of the function *main*.
>> I think the "global" keyword is more of a weirdism of PHP than
>> standard practise.
>> http://en.wikipedia.org/wiki/Global_variable#C_and_C.2B.2B
>>
>
> Exactly. However, there is no flow control outside of main(), so I
> don't account for variables declared outside of main(). If someone is
> declaring a variable in an area of the program with no flow control,
> then they are explicitly declaring their intentions that the variable
> will be global. In other words, it is not a surprise or a gotcha when
> the variable is available in a different scope.
>
>
In Vimscript, an interpreted language, there are no "declarations": any
command needs to be "executed" in order to have an effect. It is when
flow control goes through the :au, :map, :abbrev, :function or :command
command, for instance, that the autocommand, mapping, abbreviation,
function definition or user-command definition are stored in interpreter
memory; before that, Vim doesn't "know" anything about them. Similarly,
the type of a variable is set by the latest :let command affecting that
variable, you cannot "declare" a variable except by giving that variable
a value (possibly an empty value such as "", [] or {}).
Best regards,
Tony.
--
Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and
TAX-DEFERRED!
--
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
> On Wed, Oct 31, 2012 at 9:52 PM, donothing successfully
> <donothingsuccessfully@gmail.com> wrote:
>> On 31 October 2012 19:15, Dotan Cohen <dotancohen@gmail.com> wrote:
>>> […]
>>> #include <stdio.h>
>>> int foo();
>>>
>>> int main() {
>>> int x = 42;
>>> printf("%d", x);
>>> foo();
>>> return 0;
>>> }
>>>
>>> int foo() {
>>> printf("%d", x);
>>> }
>>> […]
>> Here x is a local variable of the function *main*.
>> I think the "global" keyword is more of a weirdism of PHP than
>> standard practise.
>> http://en.wikipedia.org/wiki/Global_variable#C_and_C.2B.2B
>>
>
> Exactly. However, there is no flow control outside of main(), so I
> don't account for variables declared outside of main(). If someone is
> declaring a variable in an area of the program with no flow control,
> then they are explicitly declaring their intentions that the variable
> will be global. In other words, it is not a surprise or a gotcha when
> the variable is available in a different scope.
>
>
In Vimscript, an interpreted language, there are no "declarations": any
command needs to be "executed" in order to have an effect. It is when
flow control goes through the :au, :map, :abbrev, :function or :command
command, for instance, that the autocommand, mapping, abbreviation,
function definition or user-command definition are stored in interpreter
memory; before that, Vim doesn't "know" anything about them. Similarly,
the type of a variable is set by the latest :let command affecting that
variable, you cannot "declare" a variable except by giving that variable
a value (possibly an empty value such as "", [] or {}).
Best regards,
Tony.
--
Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and
TAX-DEFERRED!
--
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
Subscribe to:
Posts (Atom)