> In second column I would like to replace all A characters with X
> characters.
>
If your example describes the problem completely, :%s/ AAA/ XXX/ should do
the trick. Note the space to separate the columns.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type y
> I was looking for something similar to Python's re.findall()/finditer()
> function to answer a question on Reddit[1] but was surprised I
> couldn't find anything in
>
Are you using Linux, MacOS ,or Windows?
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type you
> Vim can't possibly add code to support each peculiarity of each of them.
> I'm not sure what generic problem exists that is not terminal-specific.
>
The early days of Unix coincided with a Cabrian explosion of physical
terminals. This led to the development of a database of terminal
attributes
If it's Perl code, there's a utility called perltidy, which is stand-alone.
BTW, I suspect that Bram monitors vim-use, so cc-ing him just means he'll
get two copies of the message.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you
> not sure how to explain it, but if i want to have one line that is of
> background of colorscheme, and line after that, to have like some sort of
> deviation in terms of highlight. and line after this, to be again,
> background of colorscheme.
Essentially, you want the video equivalent of "gre
> Line1
>
> line3
> using unix
>
What error messages? Is something missing from the posting?
--
--
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 rec
>
> Thanks for that, Gary.
>
> I'm officially an idiot.
> --
> Ottavio Caruso
>
At least you're an honest one. :-)*
Welcome to the Order of the Golden Face-Palm, which I think we all earn at
one time or another. Confession and explanation improves collective
wisdom.
--
--
You received this me
Go through the steps you have to take for every piece of code you write,
and create scripts to do as much as possible automatically.
You have to open a file in Vim, give it a name that is not already in use,
put in some boilerplate, (#! line, description of the code's purpose, &c,
depending on l
One of the incidental pleasures of this list is the signature tags. I'm
not sure wheter today's winner is Bram's:
> Shift happens.
> -- Doppler
or Christian's:
--
10E12 Mikrophone = 1 Megaphon
10E-6 Fisch = 1 Mikrofiche
10E21 Picolos = 1 Gigolo
10 Rationen = 1 Dekoration
3 1/3
> I'm using Vim 8 or 9 with 'magic' and re=0 (same using re=1).
>
> I want to find "\[" or "\]" in text like:
> abc\[def\]ghi\\xy\z
>
The problem may lie in the boundary of a character class, [ and ] and the
rules about its content.
Does the regex interpreter read [\[] as 2 characters, "\ or ]" or
> Maybe interesting for benchmark
> https://github.com/tjdevries/vim9jit
>
If learning Rust isn't the whole purpose of the project, you might want to
look at Raku, specifically "grammars". It can be a language for generating
languages.
--
--
You received this message from the "vim_use" maillist
> --
> $ echo pizza > /dev/oven
>
Totally OT, but Bram's signature file is amazing. Yet another reason to
thank him. I shall use that as an example when explaining output
mechanisms from now on.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below
>
> I would like to embed vim code inside bash script.
>
Have you considered using sed, which was designed for this sort of job.
rather than twisting vim inside out?
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to
> The best way to avoid having those files laying around is to find
> out why Vim is unable to rename them and fix that problem. Watch
> for error messages when Vim closes.
>
Possibly a permissions problem? A look at the permissions and ownership of
the files and the containing directory might
> this applies only to the first semi-colon on each line (which
> will always exist in your situation and by assumption won't be
> found in the paths).
>
That assumption is probably reasonable, but a semi-colon is a legal
character in a Unix/Linux filename. (But should be reagarded as evidence
o
> igo...@gmail.com stated
> I have 130 thousand lines of output file.
> - Each output is in separate paragraph.
> - Each paragraph has at least two or more rows.
> &c
That was a model example of a problem statement; clear illustration of
sample input and the desired output.
I'd be inclined to g
> the distinctive feeling of flat-hand-against-my-fronthead... ;)
>
Aka (Also known as:) a face-palm. :-)*
--
--
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.
>
> I would like to sort lines by order ascendant by the alphabetical value of
> the two first columns.
>
Are you on Windoes, or an *nix?
(The example file would be more useful if the input was not in order.)
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type
> I want to include in my .vimrc an autocommand that writes some new lines
> into an empty file e.g. an zsh script.
>
A possible alternative is to use a "here" document containing whatever
boilerplate you want, in a shell script that then opens vim on the
resulting file.
--
--
You received th
Vocabulary pedant writing here.
Though the meaning is obvious in this context, "depreciate" means to lose
value, e.g. when a new car is driven off the lot, its value depreciates
25% or so.
To express disapproval of something, "deprecate" it.
There's just an iota of difference between "deprecat
If we're talking about shell grep, it's wise always to quote the search
string, (which kind of quote is preferable depends on which OS/shell),
whether it has special characters or not. If it's redundant, no harm done.
If it isn't, you don't have to guess how the shell molested your string
--
--
>
> Or maybe I've missed the point.
>
> Ottavio Caruso
>
Surely, the point is that a body that passes laws like that has way too
much spare time.
--
--
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 informatio
> I need to fix the dependency of VIM on perl without upgrading or
> changing Perl
>
> vim: error while loading shared libraries: libperl.so: cannot open
> shared object file: No such file or directory
>
It sounds as though either something has deleted the object file, or a
path setting to find it
> How can I tell Vim that, as a Linux user, I don't believe in file names
> with spaces in them?
They're legal if quoted or escaped - "dummy file" or dummy\ file.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
Assuming the "w" key still works, there's always the "nuke it from orbit"
option; write the file when you're satisfied, (or do nothing, if you don't
want to save anything, then kill the vim process.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply b
>
> 1. Change the compiler options to ignore or silence warnings.
>
Isn't that the software equivalent of sticking a nail in the fuse-box?
--
--
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, vi
>
> I don't know if there's a way to run a macro against a bunch of files in
> one pass
In that case, I'd suggest using a shell script to execute vim on the files
individually. Obviously, going to use slightly more machine time, since
it's loading vim n times, but it'c going to be more flexible, (
> I know how to insert date from command line, but is it possible to embed
> the command in the boilerplate file and have it transformed into the real
> date?
In order to keep track of file versions, I have a .vimrc file that updates
a timestamp every time the file is saved. That sounds similar t
>>
>> I'm not sure where you're based. You realise, I expect, that England
(and >> I think the USA) didn't change to the Gregorian calendar until
1752.
I'm not sure that anyone in North America in 1752 cared much about dates
more precise than a season, (see "The Soul of A New Machine"), but "cal
> I am looking for a way to periodically remove the first N lines of a file,
> to implement a "quick and dirty" log file size management scheme.
>
Have you looked at tail and its options? sed would probably also work, but
tail is probably more obvious.
--
--
You received this message from the "v
> Punch 80 times octal 0 in binary mode in each of them, throw away
> the cards but keep the confetti, and use them ne next time weddings
> will be permitted.
>
>
Seriously, don't do that. Punched card chads are sharp and hard enough to
cause eye injuries.
--
--
You received this message
>
> To make (or unpack) a tarball in general: at the shell prompt
> man tar
>
Just to amplify that a bit, with $ representing the shell prompt:
to create a tarball:
$ tar -cvzf name_of_archive_to_create directory_to_send
That will show you the files in "directory_to_send" being wrapped up.
> I know how to breathe since birth, I can't edit text!
>
Which invites the question "What do you use computers f0r?"
Even mail requires entering text. Programs and configuration files are all
text, rarely correct when first entered, and almost certainly need to be
changed from time to time.
--
> Sorry Jesus! I meant what do people use Vim or notepad for?
>
We might find it easier to understand if you explain how you use
computers, and for what? What programs do you use as tools?
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the te
>
> On Mi, 29 Jan 2020, Jesus Arocho wrote:
>
>> I have been reading this thread and I am not sure I understand the
>> question: "why would anyone need to alter text"
>
>From the point of view of a programmer, system administrator, or even a
user entering data, this does sound as strange as "why w
> Hopefully not
>
I think I'm with Christian on this one. :-)*
--
--
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 yo
> Here is a kind of filename in fat chars that I would like to recognize:
>
> * $FOOBBBAR_Ffbar_f_oobar_(2019-07-29) - Copie.zed.lnk*
> 232.0 KiB 2019
There's a practically infinite universe of expressions that could be made
to match it. What's distinctiv
> Perl is off-topic in this thread.
>
> I do not want any discussion of Perl in this thread.
>
OK, just trying to offer a solution.
--
--
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
> I frequently write (bash) shell scripts with embedded AWK scripts,
It sounds as though Perl might be good fit for whatever you are doing.
(Perl evolved because shell, sed and awk combinations were becoming
cumbersome.)
--
--
You received this message from the "vim_use" maillist.
Do not top-
Something to bear in mind with all this aliasing, linking, and
environmental trickery is the effect on subsequent maintainability.
Even if you ensure that it's properly documented and generally understood,
how many hours are going to be spent figuring out what's going on before
any real problem
We tend to get fixated on automating procedures. Most of the time, if
they're recurring jobs, it's worthwhile. Sometimes, if the file is small
and the copy/move procedure is sufficiently gruesome, it's simpler just to
type it into the destination. The "wrong" way can be less trouble.
--
--
You
> grep -l 'foo' * | xargs vim
> --
Or, if the number isn't likely huge:
vim $(grep -l 'foo' *)
--
--
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
> what is the VIM equivalent of the ".exrc" file
.vimrc
https://vim.fandom.com/wiki/Example_vimrc is just one of many examples a
search threw up.
--
--
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 informa
Does anyone else feel nostalgia for the days when, once you'd got the
terminal running at the right frequency, length and parity, you didn't
have to worry about an unknown number of functions leaping out from under
their bridges to molest your character strings, (except for Ctl-s)? :-)*
--
--
> 2018-11-22 19:16 GMT+01:00, tu...@posteo.de :
>> To avoid unneccassary write cycles to the flash (flash wear out)
>> I want to disable backup and swapfile in such a case.
Is it technically impossible to copy the file to a work directory, edit
it, and write back the edited result?
That might eve
>
> Now to the problem. I have hundreds of files that I need to edit.
That doesn't sound a situation a human being should have to grind through.
Is there any possibility of automating the process, using something like sed?
--
--
You received this message from the "vim_use" maillist.
Do not top
>
> What is platformio?
>
Almost certainly this: https://platformio.org/platformio-ide
--
--
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 receive
>>Okay, removed the DOS. Thanks.
>
> I think users of DOS would be grateful if you gave
> more specific information, e.g.:
>
> 16-bit DOS: latest supported version 7.1
> 32-bit DOS: latest supported version 7.3
>
Given the fluctuating fortunes of OSs, perhaps a matrix of OS vs version
would be
>> diff --changed-group-format= file1 file2
>> comm -12 file1 file2
>>
> That's insightful but is the side-by-side comparison I was hoping for in
> vim so I could visually assess how the collections differed.
>
Pipe into less? E.g. comm -12 file1 file2 | less
--
--
You received this
> Vim is the right tool to write (and sometimes to read as well).
>
If it's a text file, (which almost all unix files are), Vim is the right
tool to produce it. It can be used in read-only mode, if you're afraid of
accidental modifications. An alternative for that job would be "less",
(akak "more"
> On Mon, Jun 11, 2018 at 9:57 PM, Christian Brabandt
> mode)? Or if you're dead set on using only one keystroke, any F key
> other than F1 (Help) and F10 (Menu) or any Shift-F key, would IMHO be
> better than F1.
>
This reminds me of the story about a nerd who fell into a river and
drowned, des
> --
> It might look like I'm doing nothing, but at the cellular level
> I'm really quite busy.
>
Even if I wasn't a Vim fan, I think I'd subscribe just for Bram's sigs. :-)*
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are re
> I have the following situation. I want to change it
>
>b390 62b3 9062 b390 61b2
> Accually there are many lines (ten thousand more) data need to change
> their order. How can I do it?
>
It's not obvious from the example what transformation you're trying to
a
>
> What I don't seem to find is a documentation newbies-friendly to
> custom configure vim.
http://shop.oreilly.com/product/9780596529833.do
http://shop.oreilly.com/product/11687.do
https://www.ibm.com/developerworks/library/l-vim-script-1/index.html
Are good places to start.
"Conway vim"
> I am looking for a quick way to change a word(cw?) with one that was
> yanked (yw). I do not want to enter insert mode, and would like to do it
> in command mode.
>
yw
move the cursor immediately before the word to change (however you wish)
p
2dw
is one way to do it.
--
--
You received thi
> On 2017-07-30 09:10, tu...@posteo.de wrote:
>> Suppose this "steep learning curve" would be a graph
>> in the mathematical sense -- I would think, that
>> the X-axis represents t (time) and the Y-axis represents
>> the amount of knowledge k in turn.
>
Really, the cliche's the wrong way around. I
> Use mappings as suggested here:
>
Thanks for everyone who has responded. I'm still curious about the extra
space inserted by the :ab, when exactly the same sequence, (as far as I
can see) does not generate it.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type
I hesitate to ask this question, since it appears to be so simple, but the
answer ought to be useful to a lot of people.
There are many constructs in most programming languages which involve
paired characters - {} () [] particularly. It would be helpful for the
first character (or the pair) to in
> Seems like vim is requiring some specific versions/features
> of perl?
Which features? What is happening?
--
--
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.p
I think this https://xkcd.com/1823/# is apropos for this 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 more information, visit http://www.vim.org/maillist.php
---
You received this message becau
>> Can anyone give me some guide how I can pass the current line number to
>> shell?
Depending on what you want to do, and why, you might be better off passing
the file through sed or awk. Could you explain your ultimate purpose?
--
--
You received this message from the "vim_use" maillist.
Do
> At the end of the day VIM is a text editor. It supports basic printing
> with limited styling - it is not a full Unicode scripting engine with
> printing.
Very interesting discussion. At some point in the evolution from the basic
text editor, using something like LaTeX makes more sense.
There
> Usability takes thought and deliberation. Every time someone asks for
> a random feature the solution should not be "let's add a new
> :dothisonething command".
Agreed. The approach should be "What is the general case, of which this is
a particular example?". Then you only have to solve the cla
> the current version of thunderbird I cannot use (g)vim as external editor,
> nor was an appropriate plugin listed in the thunderbird pages
Wouldn't this be better addressed to the Thunderbird people? They seem to
have been the ones who broke it.
--
--
You received this message from the "vim_
>> In IBM the are tools to map a file according to a given structure
>> (File Aid).
>>
Depending on exactly what this means, Perl's "format" might do the trick:
http://www.tutorialspoint.com/perl/perl_formats.htm
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Typ
> I need vim to put the marker 7spaces in when i push enter for a new line.
>
Enter text with the code beginning in column 1, then do a global
substitution inserting 6 characters at the start of the line when saving a
new file? (Numbering at that stage, if desired.) Autoindent should then
take ca
> Shawn, what is it you're trying to do, exactly? The two parts of your
> question ("changing which file a buffer points to" and "get notified
> when a file is externally modified") are unrelated in vim.
>
This is a vim-related list, but this does raise the question of whether
vim is even the app
> I find a blank char in my file but I can't match it by \s+, I want to
> delete it, what should I do?
>
cat -v should show you what it is.
--
--
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, vi
>
> No it doesn't, at least not until it started working again. Unfortunately
> I forgot to test that before rebooting my machine...
>
Is this a Heisenbug (disappears when you search for it) or a
Schrodingerbug, (appears at random when the box is opened)? :-)*
--
--
You received this message f
Cesar, have you considered a more appropriate tool for this job, perhaps a
spreadsheet?
--
--
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 receiv
> On my system the global bomb setting is not used if I don't also add
> "setlocal bomb<" or "set bomb<".
>
Don't even think about discussing this anywhere near an airport! :-)*
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are
> I wonder how string the builtin encryption of vim really is.
>
Encryption really isn't the business of a text editor. Decrypt the
cipher-text, feed it to the editor, encrypt when saving, and be sure to
delete any temporary/backup files.
Yes. there are windows of vulnerability in there, but I w
>>
>> Has someone an advice for me?
>>
>> Alle
>
> Thank for your advises. To resume: the function keys F2 till F12 (on my
> keyboard) are available as 'shortcuts'. It is not advisable to use keys
> &c.
Alle deserves compliments for this; reading back the message as
understood. (As is the aviation
> In the Windows world people try to protect themselves using antivirus
> software, with very limitted success. In the FOSS world I usually do
> this by limitting installations to packages supported by my distro. Is
> there any other way in which one can reduce the chances of installing
> malware
>
> I am searching for a game to teach typing, which might run in vim or on
> the command line (bash).
>
See http://www.freetypinggame.net/Default.asp or
http://www.typingtest.com/games.html
No personal experience with them, but they're a start. Just be paranoid
about downloading malware.
-
>
> That was it, was just missing the vim-gnome package.
>
And Gnome is where the art is. :-)*
--
--
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
>
> at the risk of uttering blasphemy on the vim-use list, wouldn't awk be
> better suited to this task than vim?
>
"Is this a nail I see before me" quoth the hammer-wielder. :-)*
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you ar
Name extension discussion.
I wholeheartedly agree with Graham Nicholls' objection to Windowsisms, but
Richard Mitchell's explanation makes a lot of sense, especially
> I wouldn't expect or want to have the extensions on anything in my PATH.
An alternative approach might be language-specific dire
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 25 2014 12:49:37)
> Compiled by doktor5000 - running on Mageia 5
>
> Attempting to load any substantial file (> 3 lines, around 50 characters,
> approximately) with a reference to perl6 in the !# line results in vim
> displaying the line count on
79 matches
Mail list logo