id = "vim" name = "Vim" homepage = "https://www.vim.org" description = "The ubiquitous modal text editor, configured through a single vimrc." icon = "theSVG:vim" executables = ["vim"] [dotfiles] # :help vimrc, :help vimfiles — ~/.vimrc and ~/.vim on Unix, # $XDG_CONFIG_HOME/vim since Vim 9.1. The second is the configuration base # directory, written as `[configHome]` so the variable is followed rather than # ~/.config assumed. paths = ["~/.vimrc", "~/.vim/", "[configHome]/vim/"] # Every carve-out twice: ~/.vim and the XDG vim directory are the same tree # under Vim's two layouts, and a Vim 9.1 setup grows its plugin checkouts and # swap files under the XDG one. exclude = [ "~/.viminfo", "~/.vim/pack/", "~/.vim/plugged/", "~/.vim/bundle/", "~/.vim/.netrwhist", "~/.vim/swap/", "~/.vim/undo/", "~/.vim/backup/", "~/.vim/view/", "[configHome]/vim/pack/", "[configHome]/vim/plugged/", "[configHome]/vim/bundle/", "[configHome]/vim/.netrwhist", "[configHome]/vim/swap/", "[configHome]/vim/undo/", "[configHome]/vim/backup/", "[configHome]/vim/view/", ] secret = [] # These three point at absolute per-machine scratch directories. The user chose # where to put them, so they are kept for rebuilding this machine and applied # to no other. [[dotfiles.machine_lines]] file = "~/.vimrc" match = { prefix = ["set directory=", "set backupdir=", "set undodir="] } scope = "backup" [commands] format = 1 label = "Open in Vim" description = "Open files in Vim with common startup options. Optional-value flags such as -p and -o are left out." quality = "ai-draft" base = "fig:vim" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/vim.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "readonly" label = "Read-only" type = "boolean" option = ["-R"] sources = ["fig"] [[commands.field]] id = "diff" label = "Diff mode" type = "boolean" option = ["-d"] sources = ["fig"] [[commands.field]] id = "no_swap" label = "No swap file" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.field]] id = "clean" label = "Clean (no vimrc, plugins)" type = "boolean" option = ["--clean"] sources = ["fig"] [[commands.field]] id = "noplugin" label = "No plugins" type = "boolean" option = ["--noplugin"] sources = ["fig"] [[commands.field]] id = "command" label = "Command after load" type = "string" option = ["-c"] sources = ["fig"] [[commands.field]] id = "cmd" label = "Command before vimrc" type = "string" option = ["--cmd"] sources = ["fig"] [[commands.field]] id = "vimrc" label = "Use vimrc" type = "path" option = ["-u"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "startuptime" label = "Startup timing file" type = "path" option = ["--startuptime"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "binary" label = "Binary mode" type = "boolean" option = ["-b"] sources = ["fig"] [[commands.task]] id = "open" label = "Open files" fields = ["files", "readonly"] required = ["files"] [[commands.task]] id = "diff" label = "Diff files" set = { diff = [true] } fields = ["files", "diff"] required = ["files"] [[commands.task]] id = "clean" label = "Open without config" set = { clean = [true] } fields = ["files", "clean"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "readonly", "diff", "no_swap", "clean"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["command", "cmd", "vimrc", "startuptime", "binary", "noplugin"]