diff options
author | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-11-07 14:50:08 -0500 |
---|---|---|
committer | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-11-07 14:50:08 -0500 |
commit | d8d631a266e196a965514e817e3381567b2d749d (patch) | |
tree | 095401e0baf5deeb7030d90e43994cfeb19a6c70 | |
parent | 2bc97b20993b36ff8f996a4afec1e3efa3e4748d (diff) | |
parent | c40dff6453a3f4655981ba7a49dbcace0240f5fc (diff) | |
download | rneovim-d8d631a266e196a965514e817e3381567b2d749d.tar.gz rneovim-d8d631a266e196a965514e817e3381567b2d749d.tar.bz2 rneovim-d8d631a266e196a965514e817e3381567b2d749d.zip |
Merge pull request #3569 from Pyrohh/rm-open
[RFC] Remove :open command
-rw-r--r-- | runtime/doc/editing.txt | 4 | ||||
-rw-r--r-- | runtime/doc/index.txt | 3 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 6 | ||||
-rw-r--r-- | runtime/doc/vi_diff.txt | 37 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 2 | ||||
-rw-r--r-- | src/nvim/ex_cmds.lua | 6 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 34 |
8 files changed, 17 insertions, 76 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index bb3d89e4ac..ffa3f1d673 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1141,8 +1141,8 @@ If you want to always use ":confirm", set the 'confirm' option. |:mkvimrc|, |:mksession|, |:mkview|, |:split|, |:vsplit|, |:tabe|, |:tabnew|, |:cfile|, |:cgetfile|, |:caddfile|, |:lfile|, |:lgetfile|, |:laddfile|, - |:diffsplit|, |:diffpatch|, |:open|, |:pedit|, - |:redir|, |:source|, |:update|, |:visual|, |:vsplit|, + |:diffsplit|, |:diffpatch|, |:pedit|, |:redir|, + |:source|, |:update|, |:visual|, |:vsplit|, and |:qall| if 'confirm' is set. {only in Win32, Athena, Motif, GTK and Mac GUI} When ":browse" is not possible you get an error diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 0238d7cc53..75c986efcd 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1359,8 +1359,7 @@ tag command action ~ |:number| :nu[mber] print lines with line number |:nunmap| :nun[map] like ":unmap" but for Normal mode |:nunmenu| :nunme[nu] remove menu for Normal mode -|:oldfiles| :ol[dfiles] list files that have marks in the ShaDa file -|:open| :o[pen] start open mode (not implemented) +|:oldfiles| :o[ldfiles] list files that have marks in the ShaDa file |:omap| :om[ap] like ":map" but for Operator-pending mode |:omapclear| :omapc[lear] remove all mappings for Operator-pending mode |:omenu| :ome[nu] add menu for Operator-pending mode diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 2c630ed958..41b4d22cf1 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1163,13 +1163,13 @@ running) you have additional options: *:wv* *:wviminfo* :wv[iminfo][!] [file] Deprecated alias to |:wshada| command. - *:ol* *:oldfiles* -:ol[dfiles] List the files that have marks stored in the ShaDa + *:o* *:ol* *:oldfiles* +:o[ldfiles] List the files that have marks stored in the ShaDa file. This list is read on startup and only changes afterwards with ":rshada!". Also see |v:oldfiles|. The number can be used with |c_#<|. -:bro[wse] ol[dfiles][!] +:bro[wse] o[ldfiles][!] List file names as with |:oldfiles|, and then prompt for a number. When the number is valid that file from the list is edited. diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index e76c0163b5..fffb923219 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -10,33 +10,14 @@ Throughout the help files differences between Vim and Vi/Ex are given in curly braces, like "{not in Vi}". This file only lists what has not been mentioned in other files and gives an overview. -1. Simulated command |simulated-command| -2. Missing options |missing-options| -3. Limits |limits| -4. The most interesting additions |vim-additions| -5. Other vim features |other-features| -6. Command-line arguments |cmdline-arguments| +1. Missing options |missing-options| +2. Limits |limits| +3. The most interesting additions |vim-additions| +4. Other vim features |other-features| +5. Command-line arguments |cmdline-arguments| ============================================================================== -1. Simulated command *simulated-command* - -This command is in Vi, but Vim only simulates it: - - *:o* *:op* *:open* -:[range]o[pen] Works like |:visual|: end Ex mode. - {Vi: start editing in open mode} - -:[range]o[pen] /pattern/ As above, additionally move the cursor to the - column where "pattern" matches in the cursor - line. - -Vim does not support open mode, since it's not really useful. For those -situations where ":open" would start open mode Vim will leave Ex mode, which -allows executing the same commands, but updates the whole screen instead of -only one line. - -============================================================================== -2. Missing options *missing-options* +1. Missing options *missing-options* These options are in the Unix Vi, but not in Vim. @@ -58,7 +39,7 @@ w1200 number (default 23) *'w1200'* w9600 number (default 23) *'w9600'* ============================================================================== -3. Limits *limits* +2. Limits *limits* Vim has only a few limits for the files that can be edited {Vi: can not handle <Nul> characters and characters above 128, has limited line length, many other @@ -102,7 +83,7 @@ don't want a swap file at all, set 'updatecount' to 0, or use the "-n" argument when starting Vim. ============================================================================== -4. The most interesting additions *vim-additions* +3. The most interesting additions *vim-additions* Vi compatibility. |'compatible'| Although Vim is 99% Vi compatible, some things in Vi can be @@ -744,7 +725,7 @@ The "No lines in buffer" message is a normal message instead of an error message, since that may cause a mapping to be aborted. ============================================================================== -6. Command-line arguments *cmdline-arguments* +5. Command-line arguments *cmdline-arguments* Different versions of Vi have different command-line arguments. This can be confusing. To help you, this section gives an overview of the differences. diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 1060b01a1e..b0b6d6df6e 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -210,6 +210,7 @@ Other commands: :Print :fixdel :mode (no longer accepts an argument) + :open :shell :tearoff diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index e23232bbbe..cf51830b68 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -19,7 +19,7 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell " Special and plugin vim commands {{{2 syn match vimCommand contained "\<z[-+^.=]\=" -syn keyword vimOnlyCommand contained fix[del] sh[ell] P[rint] +syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint] syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns " Vim-specific options {{{2 diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 77f7dba81b..50814c4eb4 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1754,12 +1754,6 @@ return { func='ex_menu', }, { - command='open', - flags=bit.bor(RANGE, BANG, EXTRA), - addr_type=ADDR_LINES, - func='ex_open', - }, - { command='oldfiles', flags=bit.bor(BANG, TRLBAR, SBOXOK, CMDWIN), addr_type=ADDR_LINES, diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 70cf5fd029..7b5e3939f2 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -6467,40 +6467,6 @@ static void ex_find(exarg_T *eap) } /* - * ":open" simulation: for now just work like ":visual". - */ -static void ex_open(exarg_T *eap) -{ - regmatch_T regmatch; - char_u *p; - - curwin->w_cursor.lnum = eap->line2; - beginline(BL_SOL | BL_FIX); - if (*eap->arg == '/') { - /* ":open /pattern/": put cursor in column found with pattern */ - ++eap->arg; - p = skip_regexp(eap->arg, '/', p_magic, NULL); - *p = NUL; - regmatch.regprog = vim_regcomp(eap->arg, p_magic ? RE_MAGIC : 0); - if (regmatch.regprog != NULL) { - regmatch.rm_ic = p_ic; - p = get_cursor_line_ptr(); - if (vim_regexec(®match, p, (colnr_T)0)) - curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - p); - else - EMSG(_(e_nomatch)); - vim_regfree(regmatch.regprog); - } - /* Move to the NUL, ignore any other arguments. */ - eap->arg += STRLEN(eap->arg); - } - check_cursor(); - - eap->cmdidx = CMD_visual; - do_exedit(eap, NULL); -} - -/* * ":edit", ":badd", ":visual". */ static void ex_edit(exarg_T *eap) |