The section names are filepath globs (case sensitive), similar to the format accepted by gitignore. File Format DetailsĮditorConfig files use an INI format that is compatible with the format used by Python ConfigParser Library, but are allowed in the section names. (note the trailing dot), which Windows Explorer will automatically rename to. editorconfig file within Windows Explorer, you need to create a file named. Properties from matching EditorConfig sections are applied in the order they were read, so properties in closer files take precedence.įor Windows Users: To create an. editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found.ĮditorConfig files are read top to bottom and the most recent rules found take precedence. editorconfig in the directory of the opened file and in every parent directory. When opening a file, EditorConfig plugins look for a file named. indent_style = space indent_size = 2Ĭheck the Wiki for some real-world examples of projects using EditorConfig files. end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation Plugin-1-dir, plugin-2-dir etc is just the name of the plugin from when you git clone it (or however you get it), and the file/directory structure that the module comes with can be used as-is without modification.Root = true # Unix-style newlines with a newline ending every file and if you don't want the plugin loaded right when Vim starts then you can use opt directory instead of start like.~/path/to/project/.config/vim/pack/plugin3/start/plugin-3-dir.~/path/to/project/.config/vim/pack/plugin2/start/plugin-2-dir.~/path/to/project/.config/vim/pack/plugin1/start/plugin-1-dir.~/path/to/project/.config/vim/pack/all-plugins/start/plugin-3-dir.~/path/to/project/.config/vim/pack/all-plugins/start/plugin-2-dir.~/path/to/project/.config/vim/pack/all-plugins/start/plugin-1-dir.So if packpath=~/path/to/project/.config/vim then you can: Packpath for plugins under the "pack/*/start" directory." "When Vim starts up, after processing your. Once you've done set packpath in your project-specific vimrc, then you can add as many plugins you'd like. or, if you can accept this limitation, just always invoke vim from that project root.yourVariable since set can't take variables on its own. write some vimscript/etc to trace through parent directories to somehow identify the location (based on your project's unique structure) of the vim config, and then do executure ':set packpath='.know the full path and hardcode the location like set packpath=~/path/to/project/.config/vim.config/vimrc data.json then the plugins will not load. config/vimrc scriptname.py.īut when in a subdirectory of the project that packpath value won't work if you're doing vi -u. config/vim/pack/*/opt/) and this will work when invoked like vi -u. Set packpath=.config/vim will allow you to put plugins inside. but these two things might need to be used in tandem(?).įor a manual method, packpath can provide a solution (using only a single line of code in the vimrc file) with the following constraints: Additionally, :h packpath is not helpful and :h packages has no mention of it. so just guess, and try every option! I did this to no avail. Not a single plugin has I've seen has a start or opt directory, but it says to manually create that, though it's not explicitly clear about "where". The trouble here is that :h packages is not clear about the distinction between foo and foobar in the context of a plugin that we find off Github (it describes unzipping individually zipped files). #3 I've spent hours reading :h packages, :h packpath, :h runtimepath, and trying to derive a solution from them but nothing yet works.I tried using vim-plug and could get that working in the same way pathogen works (with standard location of config files) but couldn't get it working for this use case. #1: I've used pathogen for years, but I'm not sure if it's even capable of this.#2 doesn't match my criteria, as "an automatic way of sourcing vimrc from current directory" is a different use-case, I don't want automatic, it should require explicit intention by invoking -u or something comparable.vim considers ~/.vimrc and ~/.vim/ to always be siblings so if you do vi -u path/to/config/vimrc since vim is smart it will automatically look for plugins inside path/to/config/vim.perhaps has multiple ways it could be achieved?.config directory, ignoring the standard ~/.vimrc and ~/.vim/* config files. load all the plugins/colorschemes contained in that. By "project-based config" I mean a project contained in a git repo that contains all the vim configuration - vimrc and plugins and colorschemes - right there in the repo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |