Tim Chase schrieb:
I'm trying to find/create a command that acts somewhat like zO/zR
for within an existing fold.
If I use zR, it opens all the folds in the whole document.
If I use zO, it opens all the folds under the cursor.
The behavior I'm looking for is that if I'm within an existing
Yegappan Lakshmanan schrieb:
Hi,
On 6/2/07, Andy Wokula [EMAIL PROTECTED] wrote:
Within a function (or script or Ex-mode), the visual area is not
turned off
between ex commands, because there is no actual mode switching
... IMHO.
I don't know if this is mentioned in the help.
According
Ajay Gupta schrieb:
Hi All,
I saw one of my friends (once!) copying the text from the line right
above. He was using some keycombo and it would appear like he was
copying the characters one-by-one. So, if there are two lines like
quick brown fox
I see
and on the 2nd line, after 'see', i
Not nice:
:echo strftime(%e)
%e - some undefined code I used by accident
makes Vim crash.
(GVim 7.0.235, Win32)
--
Regards,
Andy
to have look at the crash from a
debugger.
-- Anatoli Sakhnik.
On 23/05/07, Andy Wokula [EMAIL PROTECTED] wrote:
Not nice:
:echo strftime(%e)
%e - some undefined code I used by accident
makes Vim crash.
(GVim 7.0.235, Win32)
--
Regards,
Andy
Also no crash with the original GVim 7.0 Win32
A.J.Mechelynck schrieb:
Robert M Robinson wrote:
First, thanks very much for creating VIM! I have been using it on
Linux systems for years, and now use it via cygwin at home as well. I
vastly prefer VIM to EMACS, especially at home. I learned vi on a
VAX/VMS system long ago (a friend of
Andy Wokula schrieb:
Gary Johnson schrieb:
On 2007-05-21, Andy Wokula [EMAIL PROTECTED] wrote:
... get position of first non-blank character in the line.
If there is col($), there should also be col(^).
In some situations (e.g. :imap expr)
:normal ^
is not allowed.
indent(.)?
HTH
Nikolai Weibull schrieb:
On 5/21/07, Andy Wokula [EMAIL PROTECTED] wrote:
... get position of first non-blank character in the line.
If there is col($), there should also be col(^).
In some situations (e.g. :imap expr)
:normal ^
is not allowed.
Then shouldn't there also be a col(0
Andy Wokula schrieb:
Tim Chase schrieb:
How can I move the cursor the start of the visual selection?
With the o command, yes. But how can I make sure the cursor
is at the start while visual mode is on? The ` motion
followed by gv sets the cursor back to the end if it was
there.
I think
Thomas Michael Engelke schrieb:
:set fileformats?
gives
fileformats=dos,unix, so both formats are available, yet the
detection and switching does not seem to work.
Are you sure _every_ line ends in ^M?
--
Regards,
Andy
EOM
, filetype skill is what you currently use for those
kind of files.
--
Regards,
Andy
EOM
Vim filetype plugin code snippet
Language: skill (cadence extension language)
File: skill_comment.vim
Date: 2007 Mai 14
Author: Andy Wokula [EMAIL PROTECTED]
Description:
After inserting
Timothy Knox schrieb:
I use vim to write my outgoing email, and for the most part, it rocks. Thanks to
all the folks who have written modules and provided tips that make it the best
thing for writing email since mailx grin.
That said, there is one small annoyance I find: When replying to an
Larson, David schrieb:
Hello Dan,
I suggest wrapping these functions into vim commands and then leverage
the command completion feature. See:
:help :command-completion
HTH,
David
-Original Message-
From: Dan Fabrizio [mailto:[EMAIL PROTECTED]
Sent: Monday, May 07, 2007 5:27 AM
To:
GVim runs into an endless loop if I do the following:
clean startup
:new at least two windows
:windo throw foo
Error detected while processing :
E605: Exception not caught: foo
E605: Exception not caught: foo
E605: Exception not caught: foo
E605:
Bram Moolenaar schrieb:
Andy Wokula wrote:
GVim runs into an endless loop if I do the following:
clean startup
:new at least two windows
:windo throw foo
Error detected while processing :
E605: Exception not caught: foo
E605: Exception not caught
A.J.Mechelynck schrieb:
[EMAIL PROTECTED] wrote:
Hi,
I want to write a macro, function or what else, which ensures, that
no german umlauts (äöüÄÖÜ) or the sz (ß) will ever occure in any
file written with vim. It does not matter, if these charactes will
appear while typing but they should
A.J.Mechelynck schrieb:
Andy Wokula wrote:
A.J.Mechelynck schrieb:
[...]
Note that the official transliteration of the eszett is not sz but
ss: upcase(ß) is SS and, in de_CH locales, the eszett is not used
(other than for archaic look, sometimes together with a Fraktur
font); ss is used
Thomas schrieb:
Yakov Lerner schrieb:
wish: allow a: in the function definition line:
function foo(a:line1, a:line2)
yeah, occasionally I do
:setl isk+=:
to get completion of variable names in vim scripts.
I'd like to have this for function arguments, too.
Counterwish: implement
Nikolai Weibull schrieb:
On 4/24/07, Andy Wokula [EMAIL PROTECTED] wrote:
Thomas schrieb:
So maybe one could make vimscript search a variable foo as l:foo,
a:foo,
(maybe also: w:foo, b:foo), s:foo, g:foo, and then throw an undefined
variable name error if none exists. Or so.
Don't
Daniel Nogradi schrieb:
Hi vimmers,
I have a very strange problem and couldn't figure out what's going on.
I use the following function for commenting out a line or a block of
lines:
function! Komment2(commentLeader, commentTrailer)
if match( getline(.), ^\ *$ ) 0
let
Andy Wokula schrieb:
Daniel Nogradi schrieb:
[...]
This function is a modified version of something I found in one of
the tips or scripts of the vim website. For C I use of course
Komment2('/* ', ' */')
and this works perfectly well, I can select a block of lines, call
the above function
Gary Johnson schrieb:
On 2007-04-16, fREW [EMAIL PROTECTED] wrote:
On 4/16/07, Tom Whittock [EMAIL PROTECTED] wrote:
What I need is to always keep the auto-indented spaces. So next time
I can start to insert from the spaced cursor.
Alternatively use cc to edit the ostensibly blank line.
Daniel Nogradi schrieb:
Hi vimmers,
I have a very strange problem and couldn't figure out what's going on.
I use the following function for commenting out a line or a block of
lines:
function! Komment2(commentLeader, commentTrailer)
if match( getline(.), ^\ *$ ) 0
let save_cpo =
OnionKnight schrieb:
I think I understand the difference now and my function is pretty neat now.
function! HomeKey ()
let c = col(.)
if c == 1
normal ^
else
normal ^
if col(.) = c
normal 0
Yakov Lerner schrieb:
I use sometimes the regex that finds paragraphs
containing given words w1,w2,... in any order ( I define paragraph
as separated by lines, \n\n).
I use the pattern like this: (two-word example, w1 and w2, but easily
expandable for N words):
Thomas schrieb:
Hi,
When I set a filetype for a buffer the variable b:did_ftplugin is set.
The help says:
If you are writing a filetype plugin to be used by many people, they
need a
chance to disable loading it. Put this at the top of the plugin:
Only do this when not done yet for
Gary Johnson schrieb:
Auro Ashish Saha wrote:
Hello,
Please help me to remove alternate lines from a text file.
00 0
123456 9
99 9
123445 9
I want to delete the line 1, 3, 5 and so on. What are the commands to be
used. Thanks for help in advance.
Method I:
A.J.Mechelynck schrieb:
Zarko Coklin wrote:
I posted following question some time back:
~
Is it possible to have a setup in .vimrc so that every
time I select tag either through CTRL-] or by
holding CTRL and pressing left mouse click to open a
new buffer in a new
Tim Chase schrieb:
Is there some function or script to count characters (letters without
whitespaces) in vim?
For example Kile the Latex Editor has such a feature to control how
long texts are.
You can use
:%s/\w//g
which will report back X substitutions on Y lines. X represents the
Arnaud Bourree schrieb:
Arnaud Bourree wrote on 20/03/2007 10:22:
Tim Chase wrote on 19/03/2007 23:01:
Or, if all your columns align, you can use visual-block mode with
control+V to create a block across the characters in question, and then
just hit d to delete.
-tim
Sorry, I'm begginer
Wolfgang Schmidt schrieb:
Hi,
I don't know about the filename part, but you could insert a date with
the following mapping:
inoremap @date C-R=strftime(%d.%m.%Y)CR
Cheers,
Wolfgang
Eric Leenman wrote:
Hi,
Is it possible to make an inoremap that inserts the date as text and
the
Kamaraju S Kusumanchi schrieb:
Let's say I opened a 6 files in a 3X2 grid inside vim. Now I want to clone
this and have all the files at the same position, same window sizes etc.,
and put it into a new tab under the same vim session. Is there a command to
do this?
commands like tabe etc., open
Kamaraju S Kusumanchi schrieb:
Andy Wokula wrote:
Simple way (recommended or not, at least quick) with sessions:
:mks
use ! to overwrite existing Session.vim
:tabnew
:so Session.vim
Just guessed it might work and it works.
Now I think sessions don't include tabpages.
This works although I
Kamaraju S Kusumanchi schrieb:
Andy Wokula wrote:
Ok tabpages are included in the session per default. Try
:set sessionoptions-=tabpages
first.
Awesome! Thanks a lot!
:help 'sessionoptions'
The help is a bit confusing. It says
There is no option to include tab pages yet, only
Simon Jackson schrieb:
I have a problem when i am in visual mode and i have text highlighted.
Instead of being able to run a command, it just overwrites my selected
text instead. im sure its because of something in my vimrc but i just
cant pinpoint it, can anyone help?
P.S.: If anyone sees some
Peng Yu schrieb:
Hi,
Suppose I want to replace string1 with string2 in a file from vim.
1. Highlight string1 (in visual mode) and then type y.
2. Highlight string2 (in visual mode) and then type p.
However, the problem with the above procedure is that string2,
instead of string1, is in
Yakov Lerner schrieb:
On 2/20/07, Tim Chase [EMAIL PROTECTED] wrote:
I'm trying to find a good way to remap control+U in insert-mode
so that it begins an undo-block. There are times when type
control+U in insert-mode and it doesn't do what I intend, or I
want to undo it, only to find that an
A.J.Mechelynck schrieb:
Andy Wokula wrote:
There is another strange detail about c-gu
In my vimrc I have (for gVim 6.4, gVim 7.0)
:imap cr crc-gu
Each u goes back one line of text in the undo history.
Note the imap instead of inoremap. This way
abbreviations still work.
For the strange
A.J.Mechelynck schrieb:
Alexey Vakhov wrote:
Hi Dear community,
Command o and O create new line and switch to insert mode. I want only
insert blank line and stay in normal mode. I know this problem can be
solved using simple mappting, but maybe in vim there are original
commands for this tip?
[EMAIL PROTECTED] schrieb:
Hello,
is it possible in a vimrc for comma separated
option strings like this one below to break:
set
dictionary=$VIM\SQLDict\BPMS_Stamm.txt,$VIM\SQLDict\BPMS_Mandant.txt,$VIM\SQL
Dict\CBS_2005.txt,$VIM\SQLDict\ICCS_Net_Strommixer.txt,$VIM\SQLDict\DBS.txt,$
Currently there is much spam in recent comments:
http://vim.sourceforge.net/tips/recent_notes.php
Andy
--
EOF
___
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
John Beckett schrieb:
Andy Wokula wrote:
Currently there is much spam in recent comments:
http://vim.sourceforge.net/tips/recent_notes.php
Last time this was discussed I got the impression that there is a
feeling that if no one reads the spam, then it is not a problem.
But I think
Tim Chase schrieb:
How can I move the cursor the start of the visual selection?
With the o command, yes. But how can I make sure the cursor
is at the start while visual mode is on? The ` motion
followed by gv sets the cursor back to the end if it was
there.
I think it sounds like you want
Tim Chase schrieb:
How can I move the cursor the start of the visual selection?
With the o command, yes. But how can I make sure the cursor
is at the start while visual mode is on? The ` motion
followed by gv sets the cursor back to the end if it was
there.
I think it sounds like you want
How can I move the cursor the start of the visual selection? With the
o command, yes. But how can I make sure the cursor is at the start
while visual mode is on? The ` motion followed by gv sets the
cursor back to the end if it was there.
Thx, Andy
--
EOF
Tom Whittock schrieb:
Hi.
I'm running the vim under cygwin, and have set up my build process to
execute via :make. This is great, but the build process reports
filenames in DOS format, not the cygwin /cygdrive/* way. This means
that when a quickfix command runs, vim will be asked to open
DervishD schrieb:
Hi all :))
I'm trying to fully understand the syntax commands, and when doing
tests a question popped up in my mind: let's say I have a region which
starts with something like \I\i*{ and ends with }. For example, the
example below will match:
strange{contents}
Luis A. Florit schrieb:
Pals,
How I avoid certain commands and/or substitutions NOT to be saved
into the history list? For example, I have a sequence of VIM commands
that executes on every email quote to properly format it, and I don't
want these to appear in the registries and history.
Luis A. Florit schrieb:
Pals,
How I avoid certain commands and/or substitutions NOT to be saved
into the history list? For example, I have a sequence of VIM commands
that executes on every email quote to properly format it, and I don't
want these to appear in the registries and history.
Matt England schrieb:
I'm trying to get function names, class names, objects, variables and
similar things to appear as non-white text with 'syntax on'.
Had the same question after editing with Visual Studio.
This is difficult, I haven't seen that before in any syntax file.
I think there are
Bram Kuijper schrieb:
Hi,
I tried to use the following tip on enclosing a visual block with quotes
in vim:
http://schlitt.info/applications/blog/index.php?/archives/331-Comfortable-PHP-editing-with-VIM-3.html
Sometimes you want to include text you already typed text into braces
or (more
Think I found a bug in the undo-branches behaviour, which cuts
undo-states. Try this out:
In a new buffer, insert `one' (or some other text), then in normal mode
type `g-g-u', now insert `two' and type `g-g-u' again (ignore quotes
`'). From now on it is not possible to get back the text states
Brecht Machiels schrieb:
Hi,
You can clear the 'modifiable' option to disable unintended
modifications to a buffer.
setlocal nomodifiable
Is is possible to prevent, for example, the project plugin from opening
another file (other than the current) in a window? The nomodifiable
option
A.J.Mechelynck schrieb:
Kamaraju Kusumanchi wrote:
On Friday 06 October 2006 08:24, Andy Wokula wrote:
Kamaraju Kusumanchi schrieb:
I use two mappings for my Fortran (.f90) files
map F5 Homev%zf
map F6 HomezDv%zf
The idea is to create folds for code blocks which are of the form
Kamaraju Kusumanchi schrieb:
I use two mappings for my Fortran (.f90) files
map F5 Homev%zf
map F6 HomezDv%zf
The idea is to create folds for code blocks which are of the form
subroutine some_name_here
statements_here
end subroutine some_name_here
Here F5 folds the subroutine
Meino Christian Cramer schrieb:
Thanks for all, Tony!!! :O)
I think Bram should add
:he Tony
-support in vim which prints your email address...
or may be it is not what you really want, isn't ir ;O)
(just kidding)
Keep hacking!
mcc
Add it yourself
:e ~/.vim/doc/tony.txt
Tim Chase schrieb:
Generally, folks would get fired for writing stunts like the following,
so read with caution...
Archived here:
http://permalink.gmane.org/gmane.editors.vim/38930
you'll find these two lines from my post:
nnoremap / :exec('cnoremap '.'cr '.'cr:exec(cunmap
Pete Johns schrieb:
For all lines longer than 72 characters, reformat the
paragraph from that line..
1,$g/.\{73,}/normal v}gq
or just
:set tw=72 if set otherwise
:g/./normal gqq
Andy
Nikolaos A. Patsopoulos schrieb:
Hi,
I'm trying to delete several lines from the beginning of file till the
appearance of a specific pattern, without deleting the pattern. I have
used the following command:
:1,/Citations: /d/e-10
but the offset doesn't work.
Thanks in advance,
why not
:1;/Citations: /-1d
of course, this is linewise, what's before Citations: in the same
line is not deleted.
Andy
oops, just overlooked Yakov's answer, sorry.
Andy
___
Telefonate ohne weitere Kosten vom
Let me take this opportunity to try once again to drum up support
for an idea that I have proposed before. IMO it is too restrictive to
make options (such as syntax highlighting, 'textwidth', and
indent-related options) apply to a whole file. There should be a
convenient, consistent
Yakov Lerner schrieb:
On 7/8/06, Andy Wokula [EMAIL PROTECTED] wrote:
I want to remap Ctrl-A (normal mode) to do something similar with other
data, e.g.
:nmap c-a ciwc-r=IncRoman(@-)cresc
Now if a count is provided this will mess up the text, e.g.
10c-a does 10ciw...
What is a good way
Cesar Romani schrieb:
Normally the language of my vim's menu is Italian.
How can I change it to English?
Many thanks in advance,
Cesar
:set langmenu=none
works for me. Put it early in your .vimrc,
:help 'langmenu'
says: This option must be set before loading menus, switching on
filetype
I want to remap Ctrl-A (normal mode) to do something similar with other
data, e.g.
:nmap c-a ciwc-r=IncRoman(@-)cresc
Now if a count is provided this will mess up the text, e.g.
10c-a does 10ciw...
What is a good way to catch the count and make it available to the
function call?
TIA Andy
64 matches
Mail list logo