I installed pymode plugin but it overrides my default setting (set wrap). According to :verbose set wrap?, the option is set by pymode.

However, I'm not sure if it is possible to override the setting. I could not find how it is done in the plugin Github repository.

  • Could you link to the plugin? Makes it easier to find. – D. Ben Knoble Apr 23 at 22:22
  • @D.BenKnoble Added! – Blaszard Apr 24 at 13:51

Typically, one can override settings for file types with .vim/after/ftplugin/{filetype}.vim, so,

" .vim/after/ftplugin/python.vim
setlocal wrap
" dont forget about b:undo_ftplugin (1)

Alternately, the plugin may provide a configuration variable (check its help documentation) that controls application of such settings.

In this case, you may want let g:pymode_options = 0

  1. For b:undo_ftplugin, I recommend my approach here, especially if (like me) you maintain a fair number of filetype-specific settings.
  • Thanks. Do you know which directory to use in Neovim? – Blaszard Apr 24 at 14:03
  • ~/.config/nvim/after/ftplugin/python.vim, i think – D. Ben Knoble Apr 24 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.