Questions tagged [load]

questions regarding finding and opening (loading) files

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

Does Vim (NeoVim) remove mappings when sourcing vimrc?

I was editing my vimrc, and decided to remove a mapping based on some information I found on <cr>. So I deleted the mapping and called my :SourceVimrc command (command SourceVimrc source $...
jeffrey.d.m's user avatar
3 votes
1 answer
409 views

open file with a particular regex search

Can one associate a regex query with a particular file, so that whenever that file is opened, the query (e.g., /text) is run, causing all instances of text to be highlighted? I considered using ...
user001's user avatar
  • 153
1 vote
0 answers
80 views

Run `checktime` only if buffer contents are different to the file contents

Sometimes a checktime causes a prompt to reload, even if the reloading would not change the buffer. This can be demonstrated (neovim 0.5): Open file in vim1 (terminal 1) Open the same file in vim2 (...
Tom Hale's user avatar
  • 2,671
2 votes
1 answer
147 views

How to change in gvim GTK file browser the default file mask wildcard (glob)?

In gvim the command :browse confirm e launches a GTK file browser. The default file mask in this window depends on the filetype from which the browse window is invoked. I would like to change that ...
Janek_Kozicki's user avatar
1 vote
2 answers
86 views

`a` append to buffer commands

Similar question, yet not duplicate of: How can I reload all buffers at once? If :wa writes all, would not :ea be expected to reload all? How could one script :ea to behave this way? What are the ...
fde-capu's user avatar
  • 283
5 votes
1 answer
6k views

What is the significance of "Incomplete last line" when opening a file?

I occasionally open a file with vim and see something like this: "<file name>" [Incomplete last line][dos format] 71 lines, 2912 characters I understand all of that information except ...
pattivacek's user avatar
3 votes
2 answers
1k views

Selectively enable a subset of vim plugins for specific category of workflows (plugin virtualenv for vim projects)

I use vim for many different categories of projects, typically: Writing code (3 languages, python, Matlab and C) Writing documentation ( .rst, .html) Writing reports (.tex) Readme file (.md) As a ...
Dr Krishnakumar Gopalakrishnan's user avatar
6 votes
2 answers
2k views

Why cannot I source vimrc for the current file being editing?

And I add this in the vimrc file: autocmd FileType markdown iabbrev mkdc <!--i--><left><left><left> What I want to do is source the vimrc and make the abbreviation effective ...
Lerner Zhang's user avatar
2 votes
1 answer
68 views

Using '-c' when calling vim from terminal

My issue is with using the -c while calling vim from terminal like $ vim -c jk I want to be able to open the last session before quitting on typing viml in terminal For this I made a map to save ...
meain's user avatar
  • 247
3 votes
1 answer
2k views

Function that opens file for editing

Is there a function that can be called to open a file for editing? I know how to open and edit files in Vim, and I know I can use :e filename, but is there a built in function I can call that does ...
still_dreaming_1's user avatar
6 votes
1 answer
286 views

How do I exclude the → from file name characters?

I have several files that prefix file names with a → character, for example In →path/to/some/file, there is a foo, in →path/to/other/file, there is a bar. etc. When the cursor is over such a path, I'...
René Nyffenegger's user avatar
2 votes
2 answers
516 views

How do I open multiple files from find each in a separate tab in vim?

I would like to find multiple files and open them all in tabs within the same vim instance.
andorov's user avatar
  • 205
4 votes
1 answer
551 views

How to set the opening file as the tags in vim?

I have lots of files named by file.tags, ncl.tags, flod.tags, ... , fortran.tags. when opening file.tags, I want to set tags=file.tags.And when opening ncl.tags, I want to set tags=ncl.tags,and so ...
hubery's user avatar
  • 41
9 votes
3 answers
3k views

Vim is displaying some info and "Press ENTER ..." when I open a file

From time to time I see something like in the status bar when I open a file: "Gemfile" 112L, 2941C "Gemfile" 112 lines --62%-- Press ENTER or type command to continue Where is it ...
firedev's user avatar
  • 2,392
8 votes
2 answers
292 views

How to access recently used files by choosing from a list?

I would like to have a keystroke to show a list of recently used files to choose one to edit. What do I need to provide that? And related, How do I manage the history of recently used files ...
Volker Siegel's user avatar
10 votes
5 answers
3k views

How do I make vim look in a set of directories for a file, if it doesn't exist in the current directory?

When I want to edit my zshrc, I just type: vim .zshrc Without specifying the full path (~/.zshrc), if I am in a different directory, this will instead start a new file. This is very annoying, since ...
muru's user avatar
  • 24.8k
4 votes
2 answers
277 views

Can the path include negative entries (exceptions to a wildcard)?

Is there a way to exclude specific files and directories from Vim's path? I was hoping a syntax like this would work: set path+=./**,!./ignoredirectory,!./ignoredirectory2,!./ignorefile.txt I would ...
user avatar
6 votes
1 answer
86 views

Tab to complete filenames with :find at an arbitrary depth

Notes: I have set path=$PWD/** in my .vimrc I am using Vim 7.3 Often times, I am sitting with Vim open at the root of my project and I enter :find somef<Tab> to find and open a file at an ...
user avatar
6 votes
3 answers
4k views

Prevent NERDTree from switching tabs when opening a file node?

In NERDTree, if I select a file node and hit o, it opens the file in a window in the current tab. However, if that particular file is already open in another tab, NERDTree switches to that tab. I find ...
Morton Fox's user avatar
15 votes
1 answer
6k views

Is it possible to easily work with .odt, .doc, .docx, .rtf, and other non-plain-text formats in Vim?

Occasionally someone sends me a .odt, .doc, and .docx file; opening them in OpenOffice is always a pain because, well, OpenOffice. Right now I use a variety of commandline tools (such as odt2txt) to ...
Martin Tournoij's user avatar
11 votes
5 answers
3k views

Navigating multiple files

If I open vim with multiple files on the command line, for example vim debug.log* which loads debug.log, debug.log.1 and debug.log.2, can I navigate between them, assign them to multiple windows (:...
SF.'s user avatar
  • 2,089
59 votes
3 answers
21k views

How can I reload all buffers at once?

When working on a feature branch in git, I frequently need to stash my changes to commit a bug fix to the main branch. When I'm done working on the changes, I git stash pop, which updates the ...
beatgammit's user avatar
  • 1,253
330 votes
6 answers
256k views

How do I reload the current file?

Quite often I am working with files that are version controlled, so it is possible for changes to be made to them outside of Vim. What is a quick way to reload the file without having to close and ...
Kevin Brown-Silva's user avatar