You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: workaround that works, curious if there's a better solution:
Instead of nnn -E trying to use EDITOR="nvim +set filetype=rename" (which doesn't work), set EDITOR=nvim-wrapper and have the wrapper script run exec /usr/bin/nvim +"set filetype=rename" "$@".
When renaming files with nnn with vim (neovim), I want to set that filetype to something specific like rename (set ft=rename). This is useful because I use a completion source containing a dictionary list of names to complete that I only want to trigger for this filetype or instance of vim launched by nnn (I don't normally want this set of completion items in other filetypes). I don't want to manually set this filetype or enable dictionary list every time in order to activate this completion.
I tried editing $EDITOR to e.g. nvim +set filetype=rename and using nnn's -E option but the +set filetype=rename args to nvim are not parsed correctly (not that I expect to, just an idea).
Another idea is to use modeline feature to set filetype, but that would make less sense for nnn to support.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT: workaround that works, curious if there's a better solution:
Instead of
nnn -Etrying to useEDITOR="nvim +set filetype=rename"(which doesn't work), setEDITOR=nvim-wrapperand have the wrapper script runexec /usr/bin/nvim +"set filetype=rename" "$@".When renaming files with nnn with vim (neovim), I want to set that filetype to something specific like
rename(setft=rename). This is useful because I use a completion source containing a dictionary list of names to complete that I only want to trigger for this filetype or instance of vim launched by nnn (I don't normally want this set of completion items in other filetypes). I don't want to manually set this filetype or enable dictionary list every time in order to activate this completion.I tried editing
$EDITORto e.g.nvim +set filetype=renameand using nnn's-Eoption but the+set filetype=renameargs to nvim are not parsed correctly (not that I expect to, just an idea).Another idea is to use modeline feature to set filetype, but that would make less sense for nnn to support.
Beta Was this translation helpful? Give feedback.
All reactions