Given two files A, and B, with the following jump lists:
A:
3: Text A2
2: Text A1
1:
>
B:
3: Text in B2
2: Text in B1
1:
>
Starting from B, how would I ever be able to reach position "Text in B1" using
?
And - as this is a rhetorical question - how could we improve this
@Ken
Thanks for the reply.
set encoding=utf-8 is my default setting...
However, in Windows:
- how can I influence the values of v:lc_time, v:lang, and v:ctype?
- how can I influence the way the internal sort command sorts (in Linux -
having set $LC_ALL to "de_DE.UTF-8") sorting works with
@Christian,
Thanks for your reply.
Is there any reason why anyone would not want UTF8? (just joking...)
That's exactly the problem, I can't set the language to UTF-8 for the various
types (messages, ctype, time) in Windows.
language english_United States.1252 works (but is not what I want).
How would I set the language to en_US.UTF-8 via the "language" command in
Windows gvim?
--
--
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
I'd like to match the following output from gcc via make:
ric.c:1703:18: error: line one
line two
^~ line three (ignore)
line four (ignore)
Beside the standard file name, error type, line, and column information, the
message
@Ben Fritz
Thanks for the answer. Using in place of - according to my
findings - makes no difference. The *type is not available when entering the
quickfix buffer for the first time. Shouldn't we consider this a bug and move
the thread to vim_dev?
--
--
You received this message from the
@Tony
Thanks for your reply.
I already tried that first proposal of your's - to no avail...
Tested the second one - with the same result...
--
--
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,
I would like to set the (unfortunately global) scrolloff option dynamically.
To accomplish that, I use the following construct (simplified):
autocmd BufEnter * call SetScrollOff()
function SetScrollOff()
let = == "quickfix" ? 3 : 5
endfunc
This approach works fine for non-quickfix windows.
Contrary to e.g. ":normal! gvim in.c
:so in.vim
/xxx
iyy
:normal!
@Guido Milanese (wow, that's an italian name for a change ;-)
1) Just to mention it: there are four variables that can be configured in the
advanced settings of Thunderbird (view_source.editor) which have not been
working for me since Thunderbird 3.x (if I recall it correctly). As far as I
I found this a (one possible) solution:
let in = input("...")
normal :
--
--
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
Is there a way the is not so "invasive"? Redrawing the whole screen, clearing
it first, seems to be a little bit much of overhead for just resetting the
command line...
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are
Is there a way (w/o plugins or VIMLing) to select two successive tags (no
children => siblings) analogously - but not similar to - using e.g. v2at or
d2at?
I'm not asking for a macro but for a native vim command (haven't found one...).
Sample ('*' denotes the cursor position; the area between
Thanks for the answers.
@DrChip: Hey, you know what I want ;-)
--
--
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
Given the following description in the docs
"The global commands work by first scanning through the [range] lines and
marking each line where a match occurs (for a multi-line pattern, only the
start of the match matters).
In a second scan the [cmd] is executed for each marked line with its line
@ZyX
O hell... I had seen this before but didn't make the connection. Sometimes you
don't see the wood for the trees.
Thanks a lot!
--
--
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
When I want to match a pattern in the first line of a document, I use "\%1l".
However, no pattern for the last line is provided in the docs (my - somewhat
naive - attempts using "\%$l", or "\%l" failed).
Did I miss something?
--
--
You received this message from the "vim_use" maillist.
Hello Christian,
thanks for the info which (unfortunately) implies that there's no native
solution to the problem...
Greetings
--
--
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
Is it possible to confine CTRL-o (jumping backwards in the jump list) to the
current file (i.e. not having the command jump to another file in the buffer
list)?
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For
On Thursday, February 26, 2015 at 9:11:35 AM UTC+1, Axel Bender wrote:
I had to dismiss a solution based on CursorHold as it isn't immediate. Sadly
there is no ReadonlyChanged event...
Where in the sources would I start btw. if I wanted to implement a new event?
--
--
You received
I had to dismiss a solution based on CursorHold as it isn't immediate. Sadly
there is no ReadonlyChanged event...
--
--
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
@Christian
Correct me, if I get sth wrong here, but autocommands are based on events? How
would I implement e.g. a ReadonlyChanged with other events?
--
--
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
I'd like to set the editor's background whenever I switch to/read a RO file, or
when I set the readonly option.
Right now I'm abusing statusline for my needs; it works pretty good but it is
also pretty dirty...
--
--
You received this message from the vim_use maillist.
Do not top-post! Type
Is there a way to capture the setting of readonly? I.e. I'd like to be able to
inject a function when the readonly setting is changed.
--
--
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
Given the following file:
abc3
abc4
bcd1
bcd3
I'd like to find the line containing bcd1 having a gap (bcd2) between it and
the next line.
Searching like this:
/^\(...\)\(\d\)\n\1\=\2+2
/^\(...\)\(\d\)\n\1\=submatch(2)+2
/^\(...\)\(\d\)\n\1\=eval(submatch(2)+2)
seemingly doesn't work. I
I'm looking for a possibility to have different split windows (say two) have
different buffer lists (via plugin or settings).
E.g. having the following screen layout
---
|||A: file01, file02
| Win1 | Win2 |B: file03, file04, file05
|||
Hm, nice try that one ;-)
However not exactly what was I was hoping to hear from 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
Czesc Mikolaj,
no problems here (see attached pics); I'm on Windows 7 (64 bit), and use
DejaVuSansMono.ttf from SourceForge. Encoding is set to UTF-8. Can you
provide a sample - non working - text?
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply
Hm, somehow my last (yesterday evening) post got removed...
Anyway. I attached a VimL file which shows the problem (at least here: version
7.3.903, Windows 7, 64 bit). Please try to execute :Hi w/o a visual block, the
cursor being in line 2.
--
--
You received this message from the vim_use
Thanks Christian,
that did 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
I'm searching a way to determine the last cursor position before entering the
command line to execute a command defined with
:command -range=% aaa call line1,line2func().
If I start from a visual block, I'm able to retrieve that position with
line(.) or a:firstline in func().
However, if I
Is there any *native* (i.e. not programmed) way to access the column position
of the last match's \zs or \ze?
--
--
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
@ben
Sorry, I was too unspecific. I want to use the \z[es] from the last match() to
prevent searching for the same - complicated - expression two times (once with
match() the second time with matchend()...).
matchlist() might come to the rescue, but I expect that having access to these
column
Thanks for the feedback!
I had hoped that - like in Perl - there is a [(possibly) undocumented] feature
or a trick that lets you extract the start and the end positions (columns)
after a *single* call to match(), using both \zs and \ze.
I would prefer such a solution over having to determine
@all
Not seeing my own post either...
As for the problem: I know this classic ;.-) approach. I was hoping that
there's some switch around that I had missed.
Thanks!
--
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying
I'm looking for a way to see the order in which autocommand events fire.
Setting verbose doesn't seem to do...
--
--
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
Hi John,
unfortunately this approach doesn't work in my situation. I'm using the same
function in a mapping operating either on visuals, or on motions
(:map-operator).
Also, I think that if a visual block is displayed (set virtualedit=block, upper
left corner in the void), then when switching
Hi Ben,
try this:
xnoremap silent _C :C-Ucall SomeFunc()CRMy current mapping
xnoremap silentexpr_D SomeFunc()CR John's proposal
xnoremap silent _E SomeFunc()CR same w/o expr
fun! SomeFunc()
let col = virtcol(') - 1
let ecol = virtcol(')
Please try it again w/o commenting out the stuff.
--
--
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
Hi Christian,
thanks for the answer. I completely go with you concerning expr, but this was
not my original problem.
In fact, I already have a solution for it (temporarily setting ve to all),
which doesn't require me to change any mapping.
However the inconsistency remains: when - with
@John
Thanks for the answer. You're right, I've actually set 'virtualedit' to
'block'. Nevertheless I would have assumed (hoped), that - whatever mode I'm in
- 'block', or 'all' - virtcol(') would reflect the actual start column.
One can - of course - argue in favor or against that, but I
Addendum: It's obviously sufficient to set virtualedit to 'block' just before
retrieving from virtcol(), and resetting it thereafter. I'm using this in a
plugin mapping that operates on a visual area or on a motion.
--
--
You received this message from the vim_use maillist.
Do not top-post!
Vim 7.3.785@Win7-64
Please, consider the following content of a buffer:
$
...p$
Then start a visual block (C-V) at the left angle of p. Extend the block to the
row above. Then use :C-Uecho col(') (or virtcol('), or getpos('), or
v, or .) to determine the start column of the visual block. All
virtcol(...) doesn't work in the example given. Please note that the
end/start - depending from where you start to select - of the block is in the
void, i.e. after the line's end (as indicated by $). Here even virtcol(...)
returns 1.
--
--
You received this message from the vim_use maillist.
@Ben
Yes, that's the exact bahavior, and yes I used the switches you specified.
Also, the described behavior is not appearing in 7.3.046.
--
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
Sorry for opening another thread. After having been away for a week, I was not
aware of having posted this before (also had not found it in a quick search).
I think, the thread should continue here.
@Tony
yes, I'm using the German keyboard using ^ as a combining key. The exact
order of input
Is there any possibility to make dib (or dab for that matter) ignore escaped
backslashes, e.g.
Current behavior:
( \(a[cursor_here]bc) ) - dib - () )
Desired behavior:
( \(a[cursor_here]bc) ) - dib - ( () )
--
You received this message from the vim_use maillist.
Do not top-post! Type your
Addendum: I'm not looking for a macro/function but for a setting.
--
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 believe to remember that this wasn't so in earlier versions of GVim. Do you
by chance know, why this was changed? It - usually - comes relatively unhandy
when editing, e.g. Windows file names.
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the
Since some patches I experience the following behavior ([] denotes the cursor
position, current patch level: 7.2.709):
a[a]aa - a
aa[]aa - spc
aa []aa - ^
aa []aa - spcShould result in aa ^[]aa
aa []aa - esc
aa[ ]aa - sgA shows 0x20
[]$a aa Should result
In fact I don't see any influence of cpo+=M either. However I don't know if
there should be a change...
On the other hand there seems to be no other place at which we might toggle
this behavior.
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the
Erratum: The current patch level here is 7.3.709 (not 7.2.709).
--
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
Thanks for pointing me in the right direction, Ben.
Sometimes you don't see the forest because of the trees...
--
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
After starting vim (7.3.608) via
gvim -U NONE -u NONE test.c
and setting
nocompatible cindent indentexpr=cindent autoindent smartindent filetype=c
vim wouldn't autoindent a after { in the first line (stays on first column).
What am I doing wrong?
--
You received this message from the
Is there a way to determine the number/name of the buffer that was last closed
with :bd?
--
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
Is there a way to change the content of the command line from within a function?
--
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
Thanks Andy.
This one is on me...
I want to change the command line in the way - a not existing function -
setcmdline() would do. The function would keep running (a kind of command
parser if you like) until the user hits e.g. CR.
--
You received this message from the vim_use maillist.
Do not
So there's no builtin function that returns that value...
Ok, thanks!
Greetings
Axel
--
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
When using the spell correction feature (set spelllang=de_de spell) a word
containing a german ß (0xDF) is displayed incorrectly if it is found to be
misspelled:
Wir wohnen nicht in der Georgenkirchstraße, sondern in der
Hauptstraße.
In this sample Georgenkirchstraße is flagged as misspelled
Same problem here:
execute !start regedit (just a sample) works fine with 7.3.441 (last
version I updated to); it's no longer working in 7.3.446:
441:
!start regedit.exe
= regedit starts
446:
!start regedit.exe
= E371: Command not found
--
You received this message from the vim_use maillist.
Being new to Mercurial a quick question:
How would I roll back a source code version e.g. from 7.3.446 to 7.3.441?
--
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
Thanks for your help, it worked right out of the box!
Is there a way to find out the syntax of the revision number/the available
revisions?
--
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
Reverting to the versions below 7.3.446, I found that the first version the
command is no longer working in, is version 7.3.445.
--
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
Thanks for your answer Tony.
UTF-8 corresponds (afaik) to CodePage 65001. Setting language to this value
(e.g. :language English_United States.65001) is possible, however, what are
its effects?
I'll try to grok through the sources...
--
You received this message from the vim_use maillist.
Do
Hi Tony!
Oh, you have the sources of Windows?
There was a time when I did have them... But I think - for now - vim's
sources will suffice ;-)
Greetings
--
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
Why isn't it possible (in Windows?) to use :lanugage to set the language
to e.g. ge-GE.UTF-8 (while ge-GE.1252 would work)?
How - for that matter - does :language relate to the 'encoding' setting?
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply below
@Andy
thanks for the input!
However - knowing about escape(cword) - I don't want to use it because
it for the reasons given in one of my previous posts (e.g. ~ always returns
a value and thus hides the info I need).
Thanks again!
--
You received this message from the vim_use maillist.
Do
@Tim
The answer I found (cmp. above) is my replacement for escape(cword),
which I didn't find helpful in all situations. I wanted to include
fewer/more characters in vim's notion of what a cword is, and I wanted to
be able to define a left boundary different from the right one.
Adding to
@Andy
Thanks for the answer!
The split on '\zs' was new to me. Made some speed tests and found that for
lines with more than 180 chars the first solution is faster, and for
shorter lines the solution below, which is based on the split() approach.
Opted for the new solution as short lines
Thanks for the replies!
The problem however isn't solved...
Having obtained the current byte index using col(.), I can't simply add n
to/subtract n from the return value of col(.) to find the beginning of
the next/previous multi-byte character (the -1 offset is ok because there's
a base
Addendum.
Heureka, I've found it!
The solution is based on a combination of virtcol(.) and byteidx(...):
function! CWord(string, class_start, class_end)
let l:len = len(substitute(a:string, ., x, g))
let l:pos = virtcol(.) - 1
let l:start = l:pos
while l:start = 0
Addendum:
Is there a UTF-8-safe version? The following doesn't work for a UTF-8 file
(both enc and fenc):
:echo getline(.)[col(.) ] =~ '\k'
when over an ü (i.e. an character that - if in Latin-1 - would be in the
default iskeyword option range).
Note: The inspected character is the *second*
Sometimes it's necessary to determine whether a given character belongs to
one of the options whose names are reflected by the above (suggested)
function names. Though it's possible to write those functions in vim
itself, one would either have to call such a function manually a) after a
change
@Andy, Tim
thanks! Sometimes one doesn't see the forrest for the trees.
--
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
Not working here (Windows 2003, Thunderbird 7.0, exteditor 1.0).
Same error in JS Console.
This seems to be an error in the plugin; even when using notepad as the
text editor, it would not get called (verified with procmon).
= Faulty plugin; nothing to do with GVim.
This returns us to the
Thanks for your input, Calon. This in fact does the trick (still an error in
the plugin); I would never have tried this myself...
Have a nice weekend
--
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
Thanks for your input XyZ!
Your improvment works for me if I replace bufexists() with buflisted() (I
don't care about hidden buffers).
Axel
--
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
Thanks for all your input! Used it to create a function that quits vi when
the last buffer is closed (didn't find one that worked out of the box with
my settings):
function! QuitIfLast(wipe)
Delete/wipe-out the current buffer
if a:wipe == 1
bwipeout!
else
bdelete
endif
Thanks for your help, Tony!
Meanwhile I created the missing function with the functionality I need.
Search for Assign the result of a COMMAND to a variable if you'd like to
comment on it.
Best regards
Axel
--
You received this message from the vim_use maillist.
Do not top-post! Type your
I wonder if it is possible to assign the result of a command to a variable
like so (not working):
let [var] = [command]
(where [command] stands for an arbitrary command producing output, like e.g.
ls].
--
You received this message from the vim_use maillist.
Do not top-post! Type your reply
80 matches
Mail list logo