vim

package
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SID = "sid"
	ARG = "arg"
	SUB = "sub"
	BUF = "buf"
	ROW = "row"
	COL = "col"
)
View Source
const FAVOR = "favor"
View Source
const INPUT = "input"
View Source
const (
	PERSON = "person"
)
View Source
const SESS = "sess"
View Source
const SYNC = "sync"
View Source
const VIM = "vim"
View Source
const VIMRC = "vimrc"

Variables

View Source
var Index = &ice.Context{Name: VIM, Help: "编辑器",
	Commands: map[string]*ice.Command{
		VIM: {Name: "vim port path auto start build download", Help: "编辑器", Action: map[string]*ice.Action{
			web.DOWNLOAD: {Name: "download", Help: "下载", Hand: func(m *ice.Message, arg ...string) {
				m.Cmdy(code.INSTALL, web.DOWNLOAD, m.Conf(VIM, kit.Keym(cli.SOURCE)))
			}},
			cli.BUILD: {Name: "build", Help: "构建", Hand: func(m *ice.Message, arg ...string) {
				m.Cmdy(code.INSTALL, cli.BUILD, _vim_pkg(m), m.Confv(VIM, kit.Keym(cli.BUILD)))
			}},
			cli.START: {Name: "start", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
				m.Cmdy(code.INSTALL, cli.START, _vim_pkg(m), "bin/vim")
			}},

			mdb.PLUGIN: {Hand: func(m *ice.Message, arg ...string) {
				m.Echo(m.Conf(VIM, kit.Keym(code.PLUG)))
			}},
			mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) {
				m.Cmdy(nfs.CAT, path.Join(arg[2], arg[1]))
			}},
		}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Cmdy(code.INSTALL, path.Base(m.Conf(VIM, kit.Keym(cli.SOURCE))), arg)
		}},

		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Save()
		}},
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Load()
			m.Cmd(mdb.PLUGIN, mdb.CREATE, VIM, m.Prefix(VIM))
			m.Cmd(mdb.RENDER, mdb.CREATE, VIM, m.Prefix(VIM))
			m.Cmd(mdb.PLUGIN, mdb.CREATE, VIMRC, m.Prefix(VIM))
			m.Cmd(mdb.RENDER, mdb.CREATE, VIMRC, m.Prefix(VIM))
		}},
	},
	Configs: map[string]*ice.Config{
		VIM: {Name: VIM, Help: "编辑器", Value: kit.Data(
			cli.SOURCE, "http://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2",
			cli.BUILD, []interface{}{
				"--enable-multibyte=yes",
				"--enable-pythoninterp=yes",
				"--enable-luainterp=yes",
				"--enable-cscope=yes",
			},

			code.PLUG, kit.Dict(
				code.SPLIT, kit.Dict(
					"space", " \t",
					"operator", "{[(&.,;!|<>)]}",
				),
				code.PREFIX, kit.Dict(
					"\"", "comment",
				),
				code.PREPARE, kit.Dict(
					code.KEYWORD, kit.Simple(
						"source", "finish",
						"set", "let", "end",
						"if", "else", "elseif", "endif",
						"for", "in", "continue", "break", "endfor",
						"try", "catch", "finally", "endtry",
						"call", "function", "return", "endfunction",

						"autocmd", "command", "execute",
						"nnoremap", "cnoremap", "inoremap",
						"colorscheme", "highlight", "syntax",
					),
					code.FUNCTION, kit.Simple(
						"has", "type", "empty",
						"exists", "executable",
					),
				),
			),
		)},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL