'Elmar Hinz' via vim_use | 12 Feb 11:48 2016

Repetition related questions

Hello all,

I bundle some questions related to repetition.

1.) I can repeat the operation by the .-command, one of the most brilliant features of vim.

Is there a command to repeat the last movement or even the last movement-operation-pair?

2.) To enable the repetition of t, T, f, F by "," and ";" they need to be stored somewhere. 

Are these variables accessible? What's their names?

3.) The .-command repetition remembers the count, the "," and ";" don't. This feels a little inconsistent. 

Is there a rationale behind?

Thank you very much.

Elmar

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

'Elmar Hinz' via vim_use | 12 Feb 11:16 2016

Why isn't replaced text registered?

Hello,

the r and R commands count to insertions and deletions. Contrary to the other commands of this group the
deleted text isn't stored into a register.

I can image, that the historical reason is to be found on the level of implementation, because replacement
spans over multiple inputs.

Is there also a rationale on the level of usability?

Kind regards,

Elmar

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guido Milanese | 12 Feb 10:44 2016
Picon

vim: thesaurus

Dear Experts,
I am using gvim (on xubuntu 15.10) for most of my daily work. I write
my scholarly work using LaTeX + BibTeX, and I normally use the
excellent LaTeX plugin. I recently tried TeXStudio, and the only
feature I found better was the easy access to the [Libre | Open]office
thesaurus. I browsed the archives of this group and googled a while,
but I did not find a real answer to this problem. Being no native
speaker of English this feature is particularly important for me. Is
the online thesaurus plugin the only possible solution?

Many thanks for your kind attention,
guido, italy

-- 
Guido Milanese - Professor of Classics - Docteur H.C. Paris ICP
http://docenti.unicatt.it/ita/guido_fabrizio_milanese

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

am | 11 Feb 16:48 2016
Picon

syn include with different background color

hi,

in my template engine i use regions of {$  $} to embed ruby

in my syntax file i have

...
syntax include  <at> Ruby syntax/ruby.vim

syn region  mcoCode   matchgroup=mcoCurlyDollar start=/{\$/ end=/\$}/ contains= <at> Ruby

HiLink mcoCurlyDollar Delimiter
...

it works fine, but i would like to have a different background color for
the entire {$  $} region of ruby code (but otherwise using the default ruby
syntax highlighting)

any ideas?

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

'Elmar Hinz' via vim_use | 11 Feb 12:43 2016

Feature or bug? Funny behaviour of cw on whitespace.

Hello,

the normal behaviour of the w motion is to move n words forward and to act exclusively.

Different from this the normal behaviour of cw is to change to the end of the current word, much like ce.

But what happens when hitting cw on whitespace between words?

(I start vim as "vim -u NONE" to exclude influences of personal settings. Right?)

Case 1: cw

It replaces the current space and switches to insert mode. It doesn't ask for word boundaries at all. So it
differs from the default w motion in this.

Case 2: 2cw

On contrary this one follows strictly the default w motion. The motion replaces forward all up to two words
but excludes the beginning of the target word. 

Result is, that a command telling to change 2 words is changing 2 whitespace regions with one word in
between, what feels very funny.

Both cases behave not the way, I would intuitively expect. That makes it more surprising, that they differ
in behaviour.

What would I intuitively expect?

* 2cw on whitespace:  Change up to the end of 2 words forward.
* 2cw in word:  Change from beginning of first word to the end of second word.
(Continue reading)

boss | 10 Feb 11:18 2016
Gravatar

How to detect i_CTRL-X submode in Vimscript?

Hello!

I have a CursorMovedI autocommand which runs some Vimscript.  Unfortunately if the user is in the CTRL-X
submode (of insert mode) when the autocommand fires, when the Vimscript finishes the user is left in
normal mode.  This doesn't happen if the completion popup is already visible; only if the user has invoked
the submode but done nothing further.

I'm assuming it's not possible to avoid the submode being exited during the course of the Vimscript
execution.  So I'd like to detect this situation and then restore the mode at the end of the Vimscript.

How then can I detect if the user is in the i_CTRL-X submode?  (The mode() function doesn't tell me.)

Many thanks in advance,

Andrew Stewart

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Elmar Hinz | 9 Feb 17:19 2016
Gravatar

inclusive-linewise: Is the help topic wrong?

Hello,

I am observing an behaviour that doesn't seem consistent with the help.

Given following text, with Cursor on A:

   Aaa
bbb
ccc

Hitting 2d$ deletes the space before A. This seems to be the behaviour of exclusive-linewise.

The help topic of exclusive-linewise explains this happens when a motion is exclusive. This conflicts
with the description that the $-motion is inclusive.

Kind regards

Elmar

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

Elmar Hinz | 9 Feb 11:56 2016
Gravatar

Feature or bug? Word movement oddities: matching blank lines

Hello,

some word movements match the empty line, others don't.

* Matching: W, w, gE, ge, B, b
* Not matching: E, e

Feature or bug? Reasoning?

Kind regards, 

Elmar

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
zismad | 8 Feb 12:41 2016
Picon

go to to file (gf) without extention

hi guys, 

when using gf vim can open a file with the same name in the current directory. 
I use vim for verilog files editing in Verilog syntax one can see something line this 

<module_name> <instance_name> (.....);

I want to be able to open the <module_name>.v file in current directory when cursor is on the <module_name<
part of that line. 

How can I get that ?

thanks
Z

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rick Howe | 8 Feb 07:41 2016
Picon

How to identify the trigger of a FilterWritePre event

A FilterWritePre event is triggered by either a filter command or diff. I would like to identify that the
event is just triggered by diff, not by any filter commands.
I tried to check a &diff variable, but it is always 1 for both running a filter command on diff mode window and
running diff on non-diff mode window, then can not identify.

I know this event is triggered on 2 buffers when running diff once. But if 2 filter commands are run on 2
different buffers (e.g. :windo %!sort), the same things happen.

Does anyone know how to do that? I would appreciate any idea.

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rick Howe | 8 Feb 07:37 2016
Picon

How to identify the trigger of a FilterWritePre event

A FilterWritePre event is triggered by either a filter command or diff. I would like to identify that the
event is just triggered by diff, not by any filter commands.

I tried to check a &diff variable, but it is always 1 for both running a filter command on diff mode window and
running diff on non-diff mode window, then can not identify.

I know this event is triggered on 2 buffers when running diff once. But if 2 filter commands are run on 2
different buffers (e.g. :windo !%sort), the same things happen.

Does anyone know how to do that? I would appreciate any idea.

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane