Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [load]

questions regarding finding and opening (loading) files

3
votes
1answer
2k 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 ...
3
votes
2answers
401 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 ...
3
votes
1answer
623 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 ...
2
votes
1answer
47 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 ...
3
votes
1answer
661 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 ...
6
votes
1answer
173 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'...
2
votes
2answers
65 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.
4
votes
1answer
481 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 ...
6
votes
2answers
1k 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 coming from? How to ...
8
votes
2answers
227 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 ...
8
votes
5answers
1k 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 ...
4
votes
2answers
112 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 ...
6
votes
1answer
73 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 ...
5
votes
3answers
2k 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 ...
14
votes
1answer
3k 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 ...
10
votes
5answers
732 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 (:...
16
votes
2answers
6k 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 ...
128
votes
5answers
61k 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 ...