1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-04-22 10:15:47 +02:00

Exclude generated files from .gitignore

I've also added sorting to be more confident that the generated file will be persistent across different machines
This commit is contained in:
Filipp Vakhitov 2024-08-21 23:06:35 +03:00 committed by Alex Pláte
parent ad20021cee
commit b005328b4a
11 changed files with 2269 additions and 8 deletions

3
.gitignore vendored
View File

@ -27,9 +27,6 @@
# Generated by gradle task "generateGrammarSource"
vim-engine/src/main/java/com/maddyhome/idea/vim/parser/generated
vim-engine/src/main/java/com/maddyhome/idea/vim/regexp/parser/generated
# Generated JSONs for lazy classloading
/vim-engine/src/main/resources/ksp-generated
/src/main/resources/ksp-generated
# Created by github automation
settings.xml

View File

@ -62,12 +62,16 @@ for a few days or send it to a friend for testing.
If you are looking for:
- Vim commands (`w`, `<C-O>`, `p`, etc.):
- Any particular command: `engine_commands.json` + `intellij_commands.json` (this files are generated during compilation, please run `gradle build` to generate them manually).
- Any particular command:
- [Commands common for Fleet and IdeaVim](vim-engine/src/main/resources/ksp-generated/engine_commands.json)
- [IdeaVim only commands](src/main/resources/ksp-generated/intellij_commands.json)
- How commands are executed in common: `EditorActionHandlerBase`.
- Key mapping: `KeyHandler.handleKey()`.
- Ex commands (`:set`, `:s`, `:nohlsearch`):
- Any particular ex command: package `com.maddyhome.idea.vim.ex.handler`.
- Any particular command:
- [Commands common for Fleet and IdeaVim](vim-engine/src/main/resources/ksp-generated/engine_ex_commands.json)
- [IdeaVim only commands](src/main/resources/ksp-generated/intellij_ex_commands.json)
- Vim script grammar: `Vimscript.g4`.
- Vim script parsing: package `com.maddyhome.idea.vim.vimscript.parser`.
- Vim script executor: `Executor`.

View File

@ -37,7 +37,8 @@ class CommandOrMotionProcessor(private val environment: SymbolProcessorEnvironme
Files.createDirectories(generatedDirPath)
val filePath = generatedDirPath.resolve(environment.options["commands_file"]!!)
val fileContent = json.encodeToString(commands)
val sortedCommands = commands.sortedWith(compareBy({ it.keys }, { it.`class` }))
val fileContent = json.encodeToString(sortedCommands)
filePath.writeText(fileContent)
return emptyList()

View File

@ -37,7 +37,8 @@ class ExCommandProcessor(private val environment: SymbolProcessorEnvironment): S
Files.createDirectories(generatedDirPath)
val filePath = generatedDirPath.resolve(environment.options["ex_commands_file"]!!)
val fileContent = json.encodeToString(commandToClass)
val sortedCommandToClass = commandToClass.toList().sortedWith(compareBy({ it.first }, { it.second })).toMap()
val fileContent = json.encodeToString(sortedCommandToClass)
filePath.writeText(fileContent)
return emptyList()

View File

@ -37,7 +37,8 @@ class VimscriptFunctionProcessor(private val environment: SymbolProcessorEnviron
Files.createDirectories(generatedDirPath)
val filePath = generatedDirPath.resolve(environment.options["vimscript_functions_file"]!!)
val fileContent = json.encodeToString(nameToClass)
val sortedNameToClass = nameToClass.toList().sortedWith(compareBy({ it.first }, { it.second })).toMap()
val fileContent = json.encodeToString(sortedNameToClass)
filePath.writeText(fileContent)
return emptyList()

View File

@ -0,0 +1,92 @@
[
{
"keys": ".",
"class": "com.maddyhome.idea.vim.action.change.RepeatChangeAction",
"modes": "N"
},
{
"keys": "<BS>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorBackSpace",
"modes": "I"
},
{
"keys": "<C-H>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorBackSpace",
"modes": "I"
},
{
"keys": "<C-I>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorTab",
"modes": "I"
},
{
"keys": "<C-L>",
"class": "com.maddyhome.idea.vim.action.RedrawAction",
"modes": "N"
},
{
"keys": "<Del>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorDelete",
"modes": "I"
},
{
"keys": "<Down>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorDown",
"modes": "I"
},
{
"keys": "<Tab>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorTab",
"modes": "I"
},
{
"keys": "<Up>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorUp",
"modes": "I"
},
{
"keys": "<kDown>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorDown",
"modes": "I"
},
{
"keys": "<kUp>",
"class": "com.maddyhome.idea.vim.action.editor.VimEditorUp",
"modes": "I"
},
{
"keys": "J",
"class": "com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesSpacesAction",
"modes": "N"
},
{
"keys": "J",
"class": "com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesSpacesAction",
"modes": "X"
},
{
"keys": "K",
"class": "com.maddyhome.idea.vim.action.editor.VimQuickJavaDoc",
"modes": "N"
},
{
"keys": "g@",
"class": "com.maddyhome.idea.vim.action.change.OperatorAction",
"modes": "N"
},
{
"keys": "g@",
"class": "com.maddyhome.idea.vim.action.change.VisualOperatorAction",
"modes": "X"
},
{
"keys": "gJ",
"class": "com.maddyhome.idea.vim.action.change.delete.DeleteJoinLinesAction",
"modes": "N"
},
{
"keys": "gJ",
"class": "com.maddyhome.idea.vim.action.change.delete.DeleteJoinVisualLinesAction",
"modes": "X"
}
]

View File

@ -0,0 +1,9 @@
{
"!": "com.maddyhome.idea.vim.vimscript.model.commands.CmdFilterCommand",
"actionl[ist]": "com.maddyhome.idea.vim.vimscript.model.commands.ActionListCommand",
"b[uffer]": "com.maddyhome.idea.vim.vimscript.model.commands.BufferCommand",
"buffers": "com.maddyhome.idea.vim.vimscript.model.commands.BufferListCommand",
"files": "com.maddyhome.idea.vim.vimscript.model.commands.BufferListCommand",
"h[elp]": "com.maddyhome.idea.vim.vimscript.model.commands.HelpCommand",
"ls": "com.maddyhome.idea.vim.vimscript.model.commands.BufferListCommand"
}

View File

@ -0,0 +1,6 @@
{
"col": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.ColFunctionHandler",
"has": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.HasFunctionHandler",
"line": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.LineFunctionHandler",
"submatch": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.SubmatchFunctionHandler"
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,129 @@
{
"&": "com.maddyhome.idea.vim.vimscript.model.commands.SubstituteCommand",
"<": "com.maddyhome.idea.vim.vimscript.model.commands.ShiftLeftCommand",
">": "com.maddyhome.idea.vim.vimscript.model.commands.ShiftRightCommand",
"@": "com.maddyhome.idea.vim.vimscript.model.commands.RepeatCommand",
"N[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.PreviousFileCommand",
"P[rint]": "com.maddyhome.idea.vim.vimscript.model.commands.PrintCommand",
"Plug[in]": "com.maddyhome.idea.vim.vimscript.model.commands.PlugCommand",
"action": "com.maddyhome.idea.vim.vimscript.model.commands.ActionCommand",
"argu[ment]": "com.maddyhome.idea.vim.vimscript.model.commands.SelectFileCommand",
"as[cii]": "com.maddyhome.idea.vim.vimscript.model.commands.AsciiCommand",
"bd[elete]": "com.maddyhome.idea.vim.vimscript.model.commands.BufferCloseCommand",
"bn[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.NextFileCommand",
"bp[revious]": "com.maddyhome.idea.vim.vimscript.model.commands.PreviousFileCommand",
"bro[wse]": "com.maddyhome.idea.vim.vimscript.model.commands.EditFileCommand",
"cal[l]": "com.maddyhome.idea.vim.vimscript.model.commands.CallCommand",
"cle[arjumps]": "com.maddyhome.idea.vim.vimscript.model.commands.ClearJumpsCommand",
"clo[se]": "com.maddyhome.idea.vim.vimscript.model.commands.QuitCommand",
"cm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"cmapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"cno[remap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"co[py]": "com.maddyhome.idea.vim.vimscript.model.commands.CopyTextCommand",
"com[mand]": "com.maddyhome.idea.vim.vimscript.model.commands.CmdCommand",
"comc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.CmdClearCommand",
"cu[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"d[elete]": "com.maddyhome.idea.vim.vimscript.model.commands.DeleteLinesCommand",
"delc[ommand]": "com.maddyhome.idea.vim.vimscript.model.commands.DelCmdCommand",
"delf[unction]": "com.maddyhome.idea.vim.vimscript.model.commands.DelfunctionCommand",
"delm[arks]": "com.maddyhome.idea.vim.vimscript.model.commands.DeleteMarksCommand",
"dig[raphs]": "com.maddyhome.idea.vim.vimscript.model.commands.DigraphCommand",
"dis[play]": "com.maddyhome.idea.vim.vimscript.model.commands.RegistersCommand",
"e[dit]": "com.maddyhome.idea.vim.vimscript.model.commands.EditFileCommand",
"ec[ho]": "com.maddyhome.idea.vim.vimscript.model.commands.EchoCommand",
"exe[cute]": "com.maddyhome.idea.vim.vimscript.model.commands.ExecuteCommand",
"exi[t]": "com.maddyhome.idea.vim.vimscript.model.commands.WriteQuitCommand",
"f[ile]": "com.maddyhome.idea.vim.vimscript.model.commands.FileCommand",
"fin[d]": "com.maddyhome.idea.vim.vimscript.model.commands.FindFileCommand",
"fir[st]": "com.maddyhome.idea.vim.vimscript.model.commands.SelectFirstFileCommand",
"g[lobal]": "com.maddyhome.idea.vim.vimscript.model.commands.GlobalCommand",
"go[to]": "com.maddyhome.idea.vim.vimscript.model.commands.GotoCharacterCommand",
"hi[de]": "com.maddyhome.idea.vim.vimscript.model.commands.QuitCommand",
"his[tory]": "com.maddyhome.idea.vim.vimscript.model.commands.HistoryCommand",
"im[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"imapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"ino[remap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"iu[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"j[oin]": "com.maddyhome.idea.vim.vimscript.model.commands.JoinLinesCommand",
"ju[mps]": "com.maddyhome.idea.vim.vimscript.model.commands.JumpsCommand",
"k": "com.maddyhome.idea.vim.vimscript.model.commands.MarkCommand",
"la[st]": "com.maddyhome.idea.vim.vimscript.model.commands.SelectLastFileCommand",
"let": "com.maddyhome.idea.vim.vimscript.model.commands.LetCommand",
"lm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"lmapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"ln[oremap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"lockv[ar]": "com.maddyhome.idea.vim.vimscript.model.commands.LockVarCommand",
"lu[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"m[ove]": "com.maddyhome.idea.vim.vimscript.model.commands.MoveTextCommand",
"ma[rk]": "com.maddyhome.idea.vim.vimscript.model.commands.MarkCommand",
"map": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"mapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"marks": "com.maddyhome.idea.vim.vimscript.model.commands.MarksCommand",
"n[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.NextFileCommand",
"nm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"nmapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"nn[oremap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"no[map]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"no[remap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"noh[lsearch]": "com.maddyhome.idea.vim.vimscript.model.commands.NoHLSearchCommand",
"norm[al]": "com.maddyhome.idea.vim.vimscript.model.commands.NormalCommand",
"nun[map]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"om[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"omapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"on[ly]": "com.maddyhome.idea.vim.vimscript.model.commands.OnlyCommand",
"ono[remap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"ou[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"p[rint]": "com.maddyhome.idea.vim.vimscript.model.commands.PrintCommand",
"pa[ckadd]": "com.maddyhome.idea.vim.vimscript.model.commands.PackaddCommand",
"prev[ious]": "com.maddyhome.idea.vim.vimscript.model.commands.PreviousFileCommand",
"pu[t]": "com.maddyhome.idea.vim.vimscript.model.commands.PutLinesCommand",
"q[uit]": "com.maddyhome.idea.vim.vimscript.model.commands.QuitCommand",
"qa[ll]": "com.maddyhome.idea.vim.vimscript.model.commands.ExitCommand",
"quita[ll]": "com.maddyhome.idea.vim.vimscript.model.commands.ExitCommand",
"red[o]": "com.maddyhome.idea.vim.vimscript.model.commands.RedoCommand",
"reg[isters]": "com.maddyhome.idea.vim.vimscript.model.commands.RegistersCommand",
"s[ubstitute]": "com.maddyhome.idea.vim.vimscript.model.commands.SubstituteCommand",
"se[t]": "com.maddyhome.idea.vim.vimscript.model.commands.SetCommand",
"setg[lobal]": "com.maddyhome.idea.vim.vimscript.model.commands.SetglobalCommand",
"sethandler": "com.maddyhome.idea.vim.vimscript.model.commands.SetHandlerCommand",
"setl[ocal]": "com.maddyhome.idea.vim.vimscript.model.commands.SetlocalCommand",
"sh[ell]": "com.maddyhome.idea.vim.vimscript.model.commands.ShellCommand",
"smap": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"smapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"snor[emap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"so[urce]": "com.maddyhome.idea.vim.vimscript.model.commands.SourceCommand",
"sor[t]": "com.maddyhome.idea.vim.vimscript.model.commands.SortCommand",
"sp[lit]": "com.maddyhome.idea.vim.vimscript.model.commands.SplitCommand",
"sunm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"t": "com.maddyhome.idea.vim.vimscript.model.commands.CopyTextCommand",
"tabN[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.PreviousTabCommand",
"tabc[lose]": "com.maddyhome.idea.vim.vimscript.model.commands.TabCloseCommand",
"tabm[ove]": "com.maddyhome.idea.vim.vimscript.model.commands.TabMoveCommand",
"tabn[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.NextTabCommand",
"tabo[nly]": "com.maddyhome.idea.vim.vimscript.model.commands.TabOnlyCommand",
"tabp[revious]": "com.maddyhome.idea.vim.vimscript.model.commands.PreviousTabCommand",
"u[ndo]": "com.maddyhome.idea.vim.vimscript.model.commands.UndoCommand",
"unlo[ckvar]": "com.maddyhome.idea.vim.vimscript.model.commands.UnlockVarCommand",
"unm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"v[global]": "com.maddyhome.idea.vim.vimscript.model.commands.GlobalCommand",
"vm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"vmapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"vn[oremap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"vs[plit]": "com.maddyhome.idea.vim.vimscript.model.commands.SplitCommand",
"vu[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"wN[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.WritePreviousFileCommand",
"w[rite]": "com.maddyhome.idea.vim.vimscript.model.commands.WriteCommand",
"wa[ll]": "com.maddyhome.idea.vim.vimscript.model.commands.WriteAllCommand",
"wn[ext]": "com.maddyhome.idea.vim.vimscript.model.commands.WriteNextFileCommand",
"wp[revious]": "com.maddyhome.idea.vim.vimscript.model.commands.WritePreviousFileCommand",
"wq": "com.maddyhome.idea.vim.vimscript.model.commands.WriteQuitCommand",
"wqa[ll]": "com.maddyhome.idea.vim.vimscript.model.commands.ExitCommand",
"x[it]": "com.maddyhome.idea.vim.vimscript.model.commands.WriteQuitCommand",
"xa[ll]": "com.maddyhome.idea.vim.vimscript.model.commands.ExitCommand",
"xm[ap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"xmapc[lear]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapClearCommand",
"xn[oremap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.MapCommand",
"xu[nmap]": "com.maddyhome.idea.vim.vimscript.model.commands.mapping.UnMapCommand",
"y[ank]": "com.maddyhome.idea.vim.vimscript.model.commands.YankLinesCommand",
"~": "com.maddyhome.idea.vim.vimscript.model.commands.SubstituteCommand"
}

View File

@ -0,0 +1,14 @@
{
"abs": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.AbsFunctionHandler",
"empty": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.EmptyFunctionHandler",
"exists": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.ExistsFunctionHandler",
"funcref": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.FuncrefFunctionHandler",
"function": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.FunctionFunctionHandler",
"get": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.GetFunctionHandler",
"join": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.JoinFunctionHandler",
"len": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.LenFunctionHandler",
"sin": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.SinFunctionHandler",
"split": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.SplitFunctionHandler",
"tolower": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.TolowerFunctionHandler",
"toupper": "com.maddyhome.idea.vim.vimscript.model.functions.handlers.ToupperFunctionHandler"
}