Hot answers tagged


You can use the :find command to locate a file by name and open it for editing. :find will search for the file in the directories listed in 'path', which by default includes the current directory. You can add more directories to 'path' that you want to look up, and you can use wildcards, including ** to traverse multiple subdirectories. In particular, to ...


You might check out tpope's apathy.vim for global site-packages.


I would use regular split function with regex covering 2 path separators. Windows can use / or \, plus mix of both: echo split('/go/src/', '[/\\]') echo split('C:\go/src/', '[/\\]')


Vim is separating out the @ when extracting the filename. Why? Per :h gf... [Vim] uses the 'isfname' option to find out which characters are supposed to be in a file name. You can demonstrate this another way by putting your cursor on the filename and running :echo expand('<cfile>') The response is "mynamespace/footer/footer.twig". <cfile>...


There are basically, two forms of modelines. Let me copy in the most important parts here together with an example: There are two forms of modelines. The first form: [text{white}]{vi:vim:ex:}[white]{options} [...] Examples: vi:noai:sw=3 ts=6 [...] The second form (this is compatible with some versions of Vi): [text{white}]{vi:vim:|Vim:ex:}[...

Only top voted, non community-wiki answers of a minimum length are eligible