Originally posted by **slalik** March 11, 2024
I think it would be useful to call vim with some options depending on the site. For example, on a webmail it could be `vim -c "set filetype=mail textwidth=72 spell"`, on a forum `vim -c "set filetype=bbcode spell"` and so on.
Is it possible to do this?
I can imagine an external approach, for example, to have a script that first read the title of the active window (say, `xdotool getactivewindow getwindowname`) and then call vim with needed options.
But I think it would be better to be able to do this using Vieb, for example, Vieb could add the domain to the filename, something like `.example.org` (this is how it works in the ["Browser's external editor" Chrome extension](https://chrome.google.com/webstore/detail/browsers-external-editor/moakhilhbeednkjahjmomncgigcoemoi))
Probably best to do in the form of a filename setting for this edit action that supports templating.
Discussed in https://github.com/Jelmerro/Vieb/discussions/546
Probably best to do in the form of a filename setting for this edit action that supports templating.