What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Questions tagged [filesystem]

questions regarding searching and navigating the filesystem

Filter by
Sorted by
Tagged with
2
votes
0answers
181 views

How to escape paths for findfile() and finddir()?

I have run into an escaping problem with the path argument to findfile({name}, {path}) / finddir({name}, {path}). In my code path is a directory, obtained via fnamemodify(<file>, ':h'). Until ...
2
votes
0answers
56 views

How long can a file be non-existent when I'm saving it in vim

When I'm using vim to edit files in a django application that is running in developer mode I sometimes encounter this crash coming from the auto-reload utility: File "/home/zefciu/.virtualenvs/15five/...
2
votes
0answers
70 views

Alter how oldfiles are displayed

Is it possible to "preprocess" the oldfiles list so that it's easier to navigate visually? As far as I can tell, the contents of the oldfiles list are presented as ordinary absolute paths, but with ...
2
votes
1answer
170 views

Multiple buffers of the same file

I ran into a problem when using the quickfix feature of vim. When I open up my source file in vim, a buffer of that file is created, and its name is shown on the status bar, let's say main.cpp. Then ...
2
votes
1answer
996 views

Open files with “whitespace names” from within Vim with gx

I have a file, e.g. ~/abc def.mp3 that I want to open from within a Vim buffer that already contains these lines. If there were no whitespaces in the filename, I could simply open the file with the ...
1
vote
1answer
34 views

Reading external file data at the end of the buffer

If I am in the middle of the buffer and want to append external file data to the current buffer. So far I move to end of the file with G and reading the data :r file so it is doing the work ...... Is ...
1
vote
2answers
74 views

Creating and destroying temporary files by vim

I integrated luacheck in vim with the following simple function: function! LuaCheck() let errors=system("luacheck " . expand("%")) cexpr errors cwindow 5 endfunction autocmd FileType lua ...
1
vote
3answers
176 views

Easily add/open a file in the same folder as the current file/buffer

I feel my current VIM setup is pretty sweet, but there is one thing that annoys me time and time again: how can I open a file or add a file to the same directory as the current file I am editing? If ...
1
vote
2answers
53 views

How to print the filename with parent directory in insert mode?

I know that I can print whole path by Ctrlr = expand('%:p') in insert mode. I can also print head/tail with expand('%:h'), expand('%:t'). I want to print the filename with it's parent directory. ...
1
vote
1answer
308 views

Checking if Makefile exists before executing autocmd

I want Vim to execute build the project automatically after I write the buffer to a *.c or *.cpp file. Here is what I've done: autocmd BufWritePost *.c,*.cpp make This one works as expected (but the ...
1
vote
1answer
381 views

Is it possible to clone a directory with netrw?

When I mark a directory with mf, then use mc to copy into the target directory, it copies the contents only rather than the directory itself. I know I could make a new directory with d, then copy the ...
1
vote
1answer
268 views

explore, netrw: How to navigate to a file / folder starting with “abc”

Is there any way to jump to a file / folder starting with a given set of characters?
1
vote
1answer
115 views

netrw: have the cursor placed on previous cwd name when going up dir

In a netrw listing, when I press - key to go up a directory, I would like the cursor placed on the line corresponding to the dir I have just left (exactly how happens on some file managers, e.g. Nemo)....
1
vote
1answer
69 views

How to show only a specific file format in ctrlp results?

I am fairly new to Vim. I keep my notes in .md files and would like to access them with CtrlP from several different directories. I would like to set a specific filter on them, because now loading all ...
1
vote
0answers
25 views

Different versions of vimrc being read [duplicate]

I have an absurd problem. Honestly, I have a hard time figuring out whether this belongs here or a Windows forum. Using Vim on Win10, I've changed my C:\Program Files (x86)\Vim\_vimrc from the awful ...
1
vote
1answer
176 views

Saving .swp/.un~ files to subdirectories

Is there any way to save these files to automatically created subdirs? Google gave me no answers. The reason is simple- I work on several computers which I keep synced via git, so having these files ...
1
vote
2answers
221 views

How to enable disabled movement keys in netrw?

Recently I started using and learning Vim. I turned off movement keys in my .vimrc file like this: noremap <Up> <NOP> noremap <Down> <NOP> noremap <Left> <NOP> ...
1
vote
0answers
425 views

Opening recent files issue

TLDR: How can I open a file from the list of recent files without going to the end of the list to get to the prompt for file number? In order to open recent files, I do :bro ol and then when I see ...
0
votes
1answer
40 views

Put a tab autocompleted path into current buffer

I use autocompletion a lot, especially for long path names: e.g. $ /home/au/Doc<tab> <tab>uments/A<tab> <tab>\ file\ with\ a\ very\ long\ name This can be performed within ...
0
votes
1answer
41 views

how to use variables in vimscript shell commands

I have this code intended to: read current line extract variable from end of line, looking for text like #ad04e482 search for filename that begins with the string ad04e482 open that file to edit in ...
0
votes
1answer
21 views

How can I modify OpenMultipleTabs so that I can open buffers for new files?

When searching for a command to enable me to open multiple tabs in normal mode, I found a custom command to do this: " Open multiple tabs at once fun! OpenMultipleTabs(pattern_list) for p in a:...
0
votes
2answers
103 views

When editing a ruby file with includes/requires how can I open the file containing the method I am on?

I have a bunch of includes at the top of my file. Then I use methods from the helpers throughout my file. How can I have it so that when my cursor is on a method name my editor can (by some ...
0
votes
0answers
44 views

Vim undofile does not work when file is too long

I use a vim persistent undo setup as follows, which have worked all that way here. set undofile set undodir=~/.vim/undodir However now I'm facing a problem when the undofile became too long, notice ...
0
votes
0answers
248 views

How to refresh the oldfiles list without restarting vim?

:browse oldfiles<cr> is useful for quickly navigating to a file I've worked on recently. Sometimes though, I want to suspend vim and do some grep or ack search and find a new file that I'm ...
-1
votes
1answer
808 views

How can I pass extra flags to FZF/ripgrep commands with the leader key?

Current functionality When I use <C-P> and <C-Å> I can respectively search file names and contents. Everything works great. Target functionality When prepending either with <leader>, ...
-4
votes
4answers
2k views

How to change the directory to save a file

Currently all I have to do is type vim file_name and it will make that file in the current directory (usually user because that is where the command line start at if you don't use the cd command). It ...

1
2