Questions tagged [ftplugin]

ftplugin is the Vim editor's mechanism for running a set of commands based on the filetype of the file being edited (for instance, html, C, javascript, etc).

A file type plugin (ftplugin) is a script that is run automatically when Vim detects the type of file when the file is created or opened. The type can be detected from the file name (for example, file sample.c has file type c), or from the file contents.

Source: Vim The Editor: File type plugins

33 questions
0
votes
4 answers

How to override some remapping in my .vimrc to edit Python properly

I code CSS and Python and for CSS I have the following little time saver inoremap : :; This is great until I start coding in Python. Every time I hit : I get an unwanted ; I should mention that to make editing in Python pleasant with…
user883807
-1
votes
1 answer

Vim: Filetype plugin setlocal options for comments and commentstring not appearing in buffer

I'm using Vim 9.0 on Windows 10. I've created a new filetype called 'projects' but setting local options for comments is not working. Here is what I've done: I added the line :filetype plugin indent on to my vimrc file. The :filetype command…
user2962912
  • 69
  • 1
  • 6
-1
votes
1 answer

How to add plugin's "ftplugin"

I often see Vim plugin have own "ftplugin" directory. (for example: https://github.com/rust-lang/rust.vim) How to load these ?
musou1500
  • 51
  • 9
1 2
3