Skip to main content

New answers tagged

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 %...
D. Ben Knoble's user avatar
  • 27.3k
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: ...
Vivian De Smedt's user avatar
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> ...
Friedrich's user avatar
  • 2,795
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 ...
Luc Hermitte's user avatar
  • 17.7k
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 :...
filbranden's user avatar
  • 29.6k
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, ...
Barzi2001's user avatar
  • 758

Top 50 recent answers are included