Questions tagged [file]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
47 views

Is it possible to close all files with content that matches a regular expression on Vim?

Let's say I have opened many files on Vim with vim file1 file2 file3... And their content is like the following: file1: random content random content stringThatMatchesRegex random content file2: ...
0
votes
1answer
23 views

How can I watch a file that isn't currently open?

I want vim to notify me if the contents of a certain file path/to/file changes, but that file won't be open in the vim instance. How can I achieve this?
1
vote
2answers
89 views

Pipe file list to vim and browser them like a folder

Is it possible to pipe list of files e.g. from grep and have this file list opened in vim file manager in similar fashion like when you open a folder with vim? Note that I do not want to just write ...
2
votes
0answers
49 views

Why does Vim create ~ files? [duplicate]

Whenever I create a file, Vim also creates a .extension~ file. For example, when I create a main.cpp file, another one appears with main.cpp~. Is the .cpp~ file an older version of my .cpp file? Is ...
1
vote
0answers
20 views

How can you isolate the date portion of each request of a IP adress? [closed]

How can you isolate the date portion of each request of a IP address if it's at the first line of each request from a log file using awk, creating a list of distinct dates, and then using grep to ...
3
votes
1answer
112 views

Slow write/save speed for files on network

I noticed my VIM write/save file for a network path is quite slow. I found out VIM saves files with approximated speed of 20mbps (2.5MB/s). Network is 1Gb/s local area network so I believe the ...
3
votes
2answers
324 views

Write register 0 to file

I am trying to write register 0, into a file. One method that I have found is to use redir: redir! /tmp/3 echo 'hello' redir end which gives me error invalid argument /tmp/3 and I don't know how ...
3
votes
2answers
181 views

Vim not firing inotify events when writing file

Mentioned here as well: https://stackoverflow.com/questions/13312794/inotify-dont-treat-vim-editting-as-a-modification-event Really frustrating issue, how can I force vim to write the file? It ...
3
votes
1answer
77 views

What is the opposite of set ff command?

I can set a file format to unix or windows by using: :set ff=unix Is there a way to check the file format ?
2
votes
2answers
86 views

How to auto-complete filenames in sub-directories when opening them for editing using e.g. `:e </path/to/file>`?

How to autocomplete filenames in sub-directories when opening them for editing using e.g. :e </path/to/file>? When opening files in sub-directories for editing using e.g. :e </path/to/file&...
2
votes
0answers
59 views

gf with search pattern instead of line number

vim file +80 will open file in vim, with cursor at line 80 vim file +/if/ will open file in vim, with cursor at first line containing if. For vim file +80, inside vim, there is gF. The question: ...
2
votes
0answers
93 views

What is the green <92> that's in my file?

I have a file exported from some system, and in vi when I open the file, there's a green <92> in it when I open it up where an ' ought to be. It messed up my bash script and left a line that ...