aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-18 14:01:20 +0100
committerGitHub <noreply@github.com>2017-02-18 14:01:20 +0100
commit158ea528545463a80ddce2cc83e52eb3b291cfa5 (patch)
treebdd3401f967f4fb37ea72c7d717402e498c97346
parentb49a74a1afe9740f18ca419dade45705da5bec46 (diff)
downloadrneovim-158ea528545463a80ddce2cc83e52eb3b291cfa5.tar.gz
rneovim-158ea528545463a80ddce2cc83e52eb3b291cfa5.tar.bz2
rneovim-158ea528545463a80ddce2cc83e52eb3b291cfa5.zip
options: Remove 'esckeys' (#6138)
This was never supported and it does not make sense for Nvim.
-rw-r--r--runtime/doc/insert.txt3
-rw-r--r--runtime/doc/options.txt12
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/term.txt4
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--runtime/optwin.vim2
-rw-r--r--src/nvim/getchar.c18
-rw-r--r--src/nvim/option_defs.h1
-rw-r--r--src/nvim/options.lua7
9 files changed, 9 insertions, 40 deletions
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index a82e17c857..2d3eaafe63 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -370,9 +370,6 @@ CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
within same the line)
-----------------------------------------------------------------------
-Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
-option.
-
The CTRL-O command sometimes has a side effect: If the cursor was beyond the
end of the line, it will be put on the last character in the line. In
mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 97d56af369..4ae4725617 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2209,18 +2209,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Scanf-like description of the format for the lines in the error file
(see |errorformat|).
- *'esckeys'* *'ek'* *'noesckeys'* *'noek'*
-'esckeys' 'ek' boolean (Vim default: on, Vi default: off)
- global
- Function keys that start with an <Esc> are recognized in Insert
- mode. When this option is off, the cursor and function keys cannot be
- used in Insert mode if they start with an <Esc>. The advantage of
- this is that the single <Esc> is recognized immediately, instead of
- after one second. Instead of resetting this option, you might want to
- try changing the values for 'timeoutlen' and 'ttimeoutlen'. Note that
- when 'esckeys' is off, you can still map anything, but the cursor keys
- won't work by default.
-
*'eventignore'* *'ei'*
'eventignore' 'ei' string (default "")
global
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index a7644fab84..2e2bec7637 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -678,7 +678,6 @@ Short explanation of each option: *option-list*
'errorbells' 'eb' ring the bell for error messages
'errorfile' 'ef' name of the errorfile for the QuickFix mode
'errorformat' 'efm' description of the lines in the error file
-'esckeys' 'ek' recognize function keys in Insert mode
'eventignore' 'ei' autocommand events that are ignored
'expandtab' 'et' use spaces when <Tab> is inserted
'exrc' 'ex' read .nvimrc and .exrc in the current directory
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 08ffee7a2f..137d3a06db 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -70,9 +70,7 @@ for a next character to arrive. If it does not arrive within one second a
single <Esc> is assumed. On very slow systems this may fail, causing cursor
keys not to work sometimes. If you discover this problem reset the 'timeout'
option. Vim will wait for the next character to arrive after an <Esc>. If
-you want to enter a single <Esc> you must type it twice. Resetting the
-'esckeys' option avoids this problem in Insert mode, but you lose the
-possibility to use cursor and function keys in Insert mode.
+you want to enter a single <Esc> you must type it twice.
Some terminals have confusing codes for the cursor keys. The televideo 925 is
such a terminal. It sends a CTRL-H for cursor-left. This would make it
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index eeb5e85036..176a29d072 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -298,6 +298,7 @@ Other options:
'antialias'
'cpoptions' ("g", "w", "H", "*", "-", "j", and all POSIX flags were removed)
'encoding' ("utf-8" is always used)
+ 'esckeys'
'guioptions' "t" flag was removed
*'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.)
*'imactivatefunc'* *'imaf'*
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index a7b94d73d4..64726937a0 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -524,8 +524,6 @@ endif
call <SID>Header("terminal")
-call append("$", "esckeys\trecognize keys that start with <Esc> in Insert mode")
-call <SID>BinOptionG("ek", &ek)
call append("$", "scrolljump\tminimal number of lines to scroll at a time")
call append("$", " \tset sj=" . &sj)
if has("gui") || has("msdos") || has("win32")
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 0717978ead..a471830c56 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1911,17 +1911,13 @@ static int vgetorpeek(int advance)
if ((mp == NULL || max_mlen >= mp_match_len)
&& keylen != KEYLEN_PART_MAP) {
- /*
- * When no matching mapping found or found a
- * non-matching mapping that matches at least what the
- * matching mapping matched:
- * Check if we have a terminal code, when:
- * mapping is allowed,
- * keys have not been mapped,
- * and not an ESC sequence, not in insert mode or
- * p_ek is on,
- * and when not timed out,
- */
+ // When no matching mapping found or found a non-matching mapping
+ // that matches at least what the matching mapping matched:
+ // Check if we have a terminal code, when:
+ // mapping is allowed,
+ // keys have not been mapped,
+ // and not an ESC sequence, not in insert mode,
+ // and when not timed out.
if ((no_mapping == 0 || allow_keys != 0)
&& (typebuf.tb_maplen == 0
|| (p_remap && typebuf.tb_noremap[
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 32021da922..602497461d 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -411,7 +411,6 @@ EXTERN char_u *p_efm; // 'errorformat'
EXTERN char_u *p_gefm; // 'grepformat'
EXTERN char_u *p_gp; // 'grepprg'
EXTERN char_u *p_ei; // 'eventignore'
-EXTERN int p_ek; // 'esckeys'
EXTERN int p_exrc; // 'exrc'
EXTERN char_u *p_fencs; // 'fileencodings'
EXTERN char_u *p_ffs; // 'fileformats'
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index fd68d1cde0..4130e69858 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -711,13 +711,6 @@ return {
defaults={if_true={vi=macros('DFLT_EFM')}}
},
{
- full_name='esckeys', abbreviation='ek',
- type='bool', scope={'global'},
- vim=true,
- varname='p_ek',
- defaults={if_true={vi=false, vim=true}}
- },
- {
full_name='eventignore', abbreviation='ei',
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,