Questions tagged [load]
questions regarding finding and opening (loading) files
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 $...
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 ...
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 (...
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 ...
`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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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'...
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 (:...
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 ...
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 ...