Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 22797

Questions about the creation, usage and debugging of filetype plugins.

0 votes

How to combine identical ftplugin files?

Just use symlinks. This is the easiest possible solution.
Matt's user avatar
  • 21.7k
3 votes
Accepted

How to properly set up ftplugin files for working with different filetypes in different wind...

So after your ftplugin was applied it also affects all new buffers as "the new default". Therefore one normally does :setlocal and never :set in ftpligins. …
Matt's user avatar
  • 21.7k
1 vote
Accepted

How do I position cursor according to filetype (gitcommit)?

And to make it clear, you can't do this by ftplugin, as restoring the cursor position normally works by BufReadPost event, not by FileType event. …
Matt's user avatar
  • 21.7k
0 votes
Accepted

Organize plugins and .vimrc settings for different filetypes using ftplugins?

Create folders ~/.vim/ftplugin/python.vim and ~/.vim/ftplugin/markdown.vim. … For this reason you normally want ~/.vim/after/ftplugin and not ~/.vim/ftplugin. Any mistakes/gotchas in this? …
Matt's user avatar
  • 21.7k
1 vote

Where should I put filetype specific options for indentation?

When in doubt look into the standard Vim runtime files. ts sts et sw should be set by after/ftplugin. sta is basically no-op, as you have &sw == &sts anyway. si ai are basically no-op as you have &cindent … And also, in general, there's nothing in setting ai si on if you have any meaningful indent/xyz.vim. cino should probably be set by after/indent, but in this case I'd rather use after/ftplugin to get rid …
Matt's user avatar
  • 21.7k
2 votes
Accepted

ftdetect, ftplugin not working as advertised -- what am I missing?

Do not prepend autocmd Set cindent option Do not set syntax option
Matt's user avatar
  • 21.7k
1 vote

Open buffer without loading ftplugins

Remove the plugin. Seriously. "Huge and slow" = "trash bin". If you're brave enough then go and re-implement all required functionality yourself. Remove/rename/comment out ftdetect folder/script (or …
Matt's user avatar
  • 21.7k