Marco | 1 Feb 01:37

Re: Display messed up

On 2012-01-31 Tim Chase <vim <at> tim.thechases.com> wrote:

> > Hmm… good question. My .Xresources file says:
> >
> > Rxvt.font: xft:Mono:pixelsize=13
>
> Was that  for the good font  or the bad font?  And is it
> only dependent  on the font-name,  or does it  behave if
> you just change the font size?

I just  did some  more tests. The  result: It  occurs with
different fonts and different  font sizes. So, probably no
font issue.

> Just to add to the pool of data, what does the output of
> :version have  to say about  "builtin_terms", "terminfo"
> and  "termresponse"  (and   note  there's  a  difference
> between "+"  and "++"  for some  of those  settings). It
> might  also helpful  to  know the  settings for  various
> term-related settings:
>
>    :set ttybuiltin? term? tenc?

++builtin_terms +terminfo +termresponse

:set ttybuiltin? term? tenc?
ttybuiltin
term=rxvt-unicode
termencoding=

(Continue reading)

ji fei | 1 Feb 02:43
Picon

Re: How to search a "path" string in a file?

May be :s#/home/user/bin/session.log#& can do this.

On Wed, Feb 1, 2012 at 2:37 AM, Gary Johnson <garyjohn <at> spocom.com> wrote:
On 2012-01-31, Jerry Dai wrote:
> Hi,
>
> I have a file with a lot of path in it. I want to search "/home/user/bin/
> session.log" without changing  "/" to "\/".
> How should I do it?

The easiest way is probably to begin a reverse search by typing '?'
followed by your path.  If you want to change that to a forward
search, simply type '/' and Enter.

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 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
gberar | 1 Feb 04:20
Picon

The Super Search and Vim Scripts for Python

I installed some Python specific Vim scripts and found that, when
editing python files, the "Super Search" does not behave as it does
normally.

If I have the cursor over "foo" in the string "foo.bar" and type the
character *, vim will search for the string "foo" as long the file is
not a python file type.

If I edit a python file and perform the same action, vim will search
for "foo.bar".

What is causing this behavior?  I really want it to perform the normal
way unless there is a good reason it does this.

The scripts that I have are

./vim73/autoload/python3complete.vim
./vim73/autoload/pythoncomplete.vim
./vim73/ftplugin/python.vim
./vim73/plugin/pydoc.vim
./vim73/syntax/python.vim
./vim73/indent/python.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

Favicon
Gravatar

Re: The Super Search and Vim Scripts for Python

On Tue, 31 Jan 2012, gberar wrote:

> I installed some Python specific Vim scripts and found that, when 
> editing python files, the "Super Search" does not behave as it does 
> normally.
>
> If I have the cursor over "foo" in the string "foo.bar" and type the 
> character *, vim will search for the string "foo" as long the file is 
> not a python file type.
>
> If I edit a python file and perform the same action, vim will search 
> for "foo.bar".
>
> What is causing this behavior?  I really want it to perform the normal 
> way unless there is a good reason it does this.

What you're calling "Super Search" is actually keyword search.  It 
searches for the keyword under the cursor¹.  One of those files you list 
is setting it so that '.' is considered part of a "word".

Seeing as how I'm not seeing this behavior, and I don't have this file:

> ./vim73/plugin/pydoc.vim

You should check to see if it sets the 'isk' (short for 'iskeyword') option.

Also, you shouldn't install plugins in the system directory (if that's 
what you're abbreviating to './').  There's a good chance they'll be 
overwritten when you update Vim.

-- 
Best,
Ben

¹: It doesn't always just use the "word" under the cursor, but only when 
there's no keyword character underneath the cursor.  For full details, see:

:help star

Also see:

:help 'iskeyword'

--

-- 
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: Display messed up

Marco wrote:
> On 2012-01-31 Tim Chase<vim <at> tim.thechases.com>  wrote:
>
>    
>>> Hmm… good question. My .Xresources file says:
>>>
>>> Rxvt.font: xft:Mono:pixelsize=13
>>>        
>> Was that  for the good font  or the bad font?  And is it
>> only dependent  on the font-name,  or does it  behave if
>> you just change the font size?
>>      
> I just  did some  more tests. The  result: It  occurs with
> different fonts and different  font sizes. So, probably no
> font issue.
>
>    
>> Just to add to the pool of data, what does the output of
>> :version have  to say about  "builtin_terms", "terminfo"
>> and  "termresponse"  (and   note  there's  a  difference
>> between "+"  and "++"  for some  of those  settings). It
>> might  also helpful  to  know the  settings for  various
>> term-related settings:
>>
>>     :set ttybuiltin? term? tenc?
>>      
> ++builtin_terms +terminfo +termresponse
>
> :set ttybuiltin? term? tenc?
> ttybuiltin
> term=rxvt-unicode
> termencoding=
>
> Hopefully  this sheds  some  light on  the  source of  the
> trouble.  I have  to admit  that  I'm no  expert in  those
> things, it had always worked for me.
>    

I suspect that your termcap/terminfo database entry may be incorrect.

If your system is using terminfo (as opposed to termcap)...

infocmp ${TERM}   -- will display the terminal settings for your current 
$TERM .  You may wish to save the output (ie.  ... > ${TERM}.info)

Then snoop on vim to see what its issuing:

script snoopy
vim somefile
:q
exit

The "snoopy" file (pls be sure that you don't already have such a file 
before doing this).  Check that the escape sequences work on your 
terminal as they're supposed to.  I'm afraid you'll probably have to 
google the codes (probably looking for ansi escape sequences will help).

Alternatively, see if you can find a terminfo entry for your ${TERM} via 
google and use infocmp to compare what you have vs what the internet 
version has.

Good luck!
Chip Campbell

--

-- 
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

John Beckett | 1 Feb 08:40
Picon

RE: The Super Search and Vim Scripts for Python

gberar wrote:
> I installed some Python specific Vim scripts and found that,
> when editing python files, the "Super Search" does not behave
> as it does normally.
>
> If I have the cursor over "foo" in the string "foo.bar" and
> type the character *, vim will search for the string "foo" as
> long the file is not a python file type.

As already mentioned, one of the scripts active for files of
type "python" is changing your 'iskeyword' setting to include a
dot.

When editing a Python file, enter the following to determine
which script is responsible:

:verbose set iskeyword?

With the default Python stuff, "." is not part of iskeyword, and
pressing * does not include any dot.

John

--

-- 
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

Mathieu Maret | 1 Feb 10:07
Picon

Re: Syntax matching

It's very interesting!
Thanks a lot.

Mathieu

2012/1/31 Ben Fritz <fritzophrenic <at> gmail.com>


On Jan 30, 11:38 am, mfc_alpha <mathieu.ma... <at> gmail.com> wrote:
> Hello !
>
> I've been looking around and I can't find a solution to my issue.
>
> I have a simple langage having 2 functions.
> BashRule and PythonRule.
>
> They both have similare signature.
>
> BashRule(type, comment, bashCode)
> and
> PythonRule(type, comment, pythonCode)
>
> It looks possible to have the bash coloration used for the 3rd
> argument of BashRule and python coloration for PyhtonRule.
> What I am missing is how to match each arguments to have proper
> coloration for each other.
> e.g.
> type get Statement coloration
> comment set Comment coloration
> and bashCode get bash coloration.
>
> May be I have been looking in the wrong direction or I want to do too
> much at one time ...
>
> Thanks for any information !
>

This looks like a good application for:

http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file

I see a note in the comments that I meant to go back and look at a bug
in the script...I'm not sure if it's still applicable or not, possibly
the script won't work as-is, but the concept is what you want if I
understand your problem correctly.

--
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 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
Marco | 1 Feb 11:52

Re: Display messed up

On 2012-01-31 Charles E Campbell Jr <drchip <at> campbellfamily.biz> wrote:

> infocmp ${TERM}  -- will  display the  terminal settings
> for your current $TERM . You may wish to save the output
> (ie. ... >  ${TERM}.info) Then snoop on vim  to see what
> its issuing:
> 
> script snoopy
> vim somefile
> :q
> exit
> 
> The "snoopy"  file (pls be  sure that you  don't already
> have  such a  file before  doing this).  Check that  the
> escape  sequences  work  on  your  terminal  as  they're
> supposed to.

Using your instructions I get two files with approximately
50 lines of codes, but I don't really have an idea how and
what to  check. I  compared some sequences  manually, they
were  all equal.  But  for instance  some sequences  (e.g.
smso=\E[7m) are only found in the infocmp output.

> I'm  afraid you'll  probably  have to  google the  codes
> (probably looking for ansi escape sequences will help).
>
> Alternatively, see if you can  find a terminfo entry for
> your ${TERM} via google and  use infocmp to compare what
> you have vs what the internet version has.

Thanks for  the suggestions.  I'll try  to gather  as much
information as possible.

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

Cesar Romani | 1 Feb 15:08
Picon

Re: autoalign and html

On 30/01/2012 10:04 a.m., Marcin Szamotulski wrote:
 > On 09:51 Mon 30 Jan     , Charles Campbell wrote:
 >> Marcin Szamotulski wrote:
 >>> You can check the AutoAlign version (v14i) from:
 >>> http://drchip.0sites.net/astronaut/vim/#AUTOALIGN
 >>>
 >>> Best,
 >>> Marcin
 >>>
 >>> On 18:47 Sat 28 Jan     , Cesar Romani wrote:
 >>>
 >>>> I'm using wim 7.3.420 on windows 7 with the latest version of
 >>>> AutoAlign. Whenever I edit a html file and try to close "<table"
 >>>> with ">" I get:
 >>>>
 >>>> --------------------
 >>>> Error detected while processing function AutoAlign:
 >>>> line   70:
 >>>> E108: No such variable: "b:autoalign"
 >>>> --------------------
 >>>>
 >>>> That doesn't happen with other tags, only with<table>
 >>>>
 >>>> Many thanks in advance,
 >>>>
 >> Hello,
 >>
 >> Like Marcin S, I don't see an error with<table>  in *.html files
 >> using v14i.
 > I didn't say I don't see an error ;) [I did not try] - this is my
 > personal experience with (Auto)Align plugin to test the most recent
 > version :).
 >
 > Cheers,
 > Marcin

Thanks Marcin and Chip, it works with v14i. I tried to update AutoAlign
with GLVS and I thought it'd update to the latest version but it wasn't
the case.

Regards,

-- 
Cesar

--

-- 
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

Jerry Dai | 1 Feb 18:49
Picon

Re: How to search a "path" string in a file?

Thanks.
This works perfectly!
 
-- --
Best Regards
Jerry Dai



On Tue, Jan 31, 2012 at 10:37 AM, Gary Johnson <garyjohn <at> spocom.com> wrote:
On 2012-01-31, Jerry Dai wrote:
> Hi,
>
> I have a file with a lot of path in it. I want to search "/home/user/bin/
> session.log" without changing  "/" to "\/".
> How should I do it?

The easiest way is probably to begin a reverse search by typing '?'
followed by your path.  If you want to change that to a forward
search, simply type '/' and Enter.

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 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

Gmane