Questions tagged [filenames]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

":!echo %:~" yields full path, not path relative to user's home

According to :help filename-modifiers, :!echo %:~ should echo the path of a file relative to my home directory. If I am editing ~/tmp/SomeFile.txt, I would expect tmp/SomeFile.txt. Instead, I get /...
0
votes
1answer
53 views

Always show top bar with files names

When I open more than one tab, in the top appears a bar with the names of the focused files: but when I close the second tab the bar disappears: How can I keep that top bar always open? I also want ...
0
votes
1answer
52 views

Can I define a function with '#'-namespace in a file with hyphen '-' in its name?

I often see #-namespaces in plugins source code, e.g coc#status(), fzf#run(), fugitive#extract_git_dir. I would like to use namespaces in my own config, mappings and commands source code also. But I'm ...
1
vote
0answers
54 views

How to sort the list of buffers

How to sort the list of buffers Vim displays on entering :b <Tab> by most recent? I'm used to the Spacemacs ordering, which displays buffer filenames in separate rows (vertically) in the order ...
0
votes
1answer
45 views

Select buffer from list of buffers filtered by a partial name match?

Let's say I entered a folder with many files and I opened them with vim *. I know that if I want to list all the files inside the buffer I can use the command :ls, and then I can navigate those files ...
1
vote
1answer
26 views

gF with given word as delimiter between filename and line number

I know Vim's gF can work on this pattern: swank.lisp:1694 However, how can I tune gF to work with the slimv's cross-reference giving pattern: swank.lisp line 1694 Thanks!
4
votes
1answer
66 views

Why do some Ex commands not need a white space before a path argument?

For example, why does this work: edit/home/foo/bar.txt (I had to enter visual to see the changes) I was expecting a whitespace after edit, like: edit /home/foo/bar.txt I couldn't find a reference in ...
0
votes
1answer
19 views

Can I create a file and read in shell command output in one line?

I want to create a file and read in function declaration to be able to edit it further. e() { echo $FUNCNAME } vim FILE < <(declare -f e ) but that doesn't seem to work and the filename expands ...
1
vote
2answers
129 views

Compilation keybinds for different filetypes in vimrc

I am trying to create some keybind "scripts" for specified file types in my .vimrc. Example : au BufNewFile,BufRead *.cpp \ nnoremap <C-P> :!g++ % -o %.exe <CR> Ideally I ...
1
vote
0answers
29 views

Newline remains after doing shellescape() on a filename

I am working with a kind of database file containing filenames and some metadata: 2020-21-03 /run/My Drive/Folder 1/image1.jpg 2020-20-03 /run/My Drive/Folder 1/image2.jpg I am aware ...
3
votes
1answer
232 views

How to exclude filetype with autocmd to load language specific skeleton

I have the following in order to use a different template per language. But I want English to be the default, if I don't specify .en.adoc in the filename. But the *.adoc,*.en.adoc also picks up *.fr....
0
votes
0answers
897 views

How to (auto) complete filenames?

Developing in nodejs I have a lot of custom module require statements in my javascript source files, like this one: // // my nodejs program: // path/to/projecthome/lib/someModule.js // const EMOJI = ...