New answers tagged command-line
3
votes
How can I delete a column from several CSV files?
To repeat actions across files, you usually want to use :argdo, :bufdo, :cdo, or a few other similar commands for windows or tabs.
For example, you might start Vim like vim my-csvs*, and then
:argdo %...
3
votes
Accepted
How can I delete a column from several CSV files?
Chaining the normal command
The normal command parse the entire line.
To circumvent that problem you can use the execute command that accepted to be chained using the | operator.
You could then do:
...
3
votes
Need strftime() output in the buffer
Another way to get an expression's return value into the buffer is to use a map expression.
The following will insert today's date when pressing F2 in Insert mode:
:inoremap <expr> <F2> ...
3
votes
Need strftime() output in the buffer
:put has a few limitations -- see filbranden's answer. When I need expressions that are too complex for it, I use of these two workarounds:
either I store what I wish to display into a variable and ...
6
votes
Accepted
Need strftime() output in the buffer
In short, you need to use single quotes instead of double quotes for this command:
:put =strftime('%F')
The double quote character indicates the start of a comment in Ex (Vim command-line mode), see :...
0
votes
Accepted
Is it possible to redirect the content of a wildmenu to a variable?
I can answer by myself: yes, it is possible. The function for achieving that is :h getcompletion(). However, note that the operation is blocking, in the sense that if the completion list is large, ...
Top 50 recent answers are included
Related Tags
command-line × 484key-bindings × 53
vimscript × 40
external-command × 37
neovim × 34
vimrc × 24
normal-mode × 21
search × 20
autocompletion × 19
autocmd × 18
vim-windows × 15
buffers × 14
ex-mode × 13
regular-expression × 11
terminal × 11
gvim × 10
substitute × 10
visual-mode × 10
functions × 10
range × 10
cut-copy-paste × 9
replace × 9
register × 9
bash × 9
user-commands × 9