Sunday, March 1, 2015

Re: Pressing key 'T' prints 7 in VIM 7.4

On 2015-03-01 12:49, Avinash Sonawane wrote:
> I am experiencing an odd behavior in VIM. Whenever I press key 'T'
> it prints 7 on the screen like a leetspeak. But the key 'T' works
> fine in other applications like gedit/firefox etc. So clearly not a
> keyboard problem. How do I rectify this problem as I am not able to
> use any of the :set commands.

It would help to have a little extra info:

- is this in terminal vim or gvim, or both?

- you mention that it doesn't happen in other applications, does that
include the terminal (this is tied to the previous question)?
This would show whether the fault lies in the terminal emulator
(weird, but possible). You might even try an alternate terminal
emulator (xterm, rxvt, etc) and see if the behavior persists.

- are you pressing "t" or shift+T (you show a capital T)? If it's
just "t", does pressing shift+T get you whatever your keyboard
shows above the "7"? (on my keyboard, that's an ampersand, "&")

- does it happen just in Insert mode, Normal mode, or both? (in
Normal mode, "T" followed by a letter moves the cursor backwards on
the current line to just after the previous match of the letter you
typed after the "T" as detailed at ":help T")

- if you come in with another device with a different keyboard
(whether a USB keyboard, or via SSH from another machine), does it
exhibit the same behavior?

- does the output of ":map" or ":map!" include anything that might be
remapping your "T"?

> Here is my .vimrc (Actually just yanked the example vimrc shipped
> with VIM) : http://hastebin.com/jasutanele.dos

I don't see anything spurious in your vimrc.

-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: syntax highlighting for class names

Thanks Paul! I'm probably close now, but not quite there. Do you see anything wrong with this?

syntax keyword jsClassKeywords class extends contained
syntax region javaScriptClassName start=/^class \| class /hs=e+1 end=/ /he=s-1 "contains=jsClassKeywords

--
--
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: syntax highlighting for class names

Le dimanche 01 mars 2015 à 06:36, Mark Volkmann a écrit:
> I wanted to highlight Foo and Bar in the following line:
>
> class Foo extends Bar {
>
> I have this working now using the following:
>
> syntax region javaScriptClassName start=/^class \| class /hs=e+1 end=/ /he=s-1 oneline
> " Can't start the start pattern with a space because javaScriptClassName already consumed it.
> syntax region javaScriptExtendsName start=/extends /hs=e+1 end=/ /he=s-1 oneline
>
> However, I also wanted to treat "class" and "extends" as keywords and highlight those.
> When I do that, my regions above stop working.
> Not sure why I can't have both.

You should use contained groups, e.g.:

syn keyword jsClassKeyword class extends contained
syn match jsClass +^\s*class.\+\ze{+ contains=jsClassKeyword

See ":help syn-contains".

Best,
Paul

--
--
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: syntax highlighting for class names

I wanted to highlight Foo and Bar in the following line:

class Foo extends Bar {

I have this working now using the following:

syntax region javaScriptClassName start=/^class \| class /hs=e+1 end=/ /he=s-1 oneline
" Can't start the start pattern with a space because javaScriptClassName already consumed it.
syntax region javaScriptExtendsName start=/extends /hs=e+1 end=/ /he=s-1 oneline

However, I also wanted to treat "class" and "extends" as keywords and highlight those.
When I do that, my regions above stop working.
Not sure why I can't have both.

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

Pressing key 'T' prints 7 in VIM 7.4

Hello!

I am pretty noob to VIM. Actually just started using it from yesterday only!

I am experiencing an odd behavior in VIM. Whenever I press key 'T' it
prints 7 on the screen like a leetspeak. But the key 'T' works fine in
other applications like gedit/firefox etc. So clearly not a keyboard
problem. How do I rectify this problem as I am not able to use any of
the :set commands.

Here is my .vimrc (Actually just yanked the example vimrc shipped with VIM) :
http://hastebin.com/jasutanele.dos

BTW I am using Ubuntu 13.10 x86_64.

Thanks!

--
Avinash Sonawane (RootKea)
PICT, Pune
http://www.rootkea.wordpress.com

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

Pressing key 'T' prints 7 in VIM 7.4

Hello!

I am pretty noob to VIM. Actually just started using it from yesterday only!

I am experiencing an odd behavior in VIM. Whenever I press key 'T' it prints 7 on the screen like a leetspeak. But the key 'T' works fine in other applications like gedit/firefox etc. So clearly not a keyboard problem. How do I rectify this problem as I am not able to use any of the :set commands.

Here is my .vimrc (Actually just yanked the example vimrc shipped with VIM) :
http://hastebin.com/jasutanele.dos

BTW I am using Ubuntu 13.10 x86_64.

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.

Re: vimdiff performance bug?

Hi kamaraju!

On Sa, 28 Feb 2015, kamaraju kusumanchi wrote:

> I am not the OP but have a follow up question. Is it possible to
> document the --startuptime option in the man page? It works in vim
> 7.4.488 on Debian but is not listed in the man page.

Indeed. But it is documented at :h startup
By the way, we are accepting patches at vim-dev@vim.org ;)

Best,
Christian
--
Wie man sein Kind nicht nennen sollte:
K. K. Lacke

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