diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:09:09 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 01:16:42 +0100 |
commit | ef7af078ef41fabbf3ca9d25acb6a1062a0716a7 (patch) | |
tree | 29fff7cf7590879f3ab99e9ba141e8d6b149d846 /runtime/doc/eval.txt | |
parent | 8c6a92c6e2af2d5025b1be994802d61f39af2b9e (diff) | |
download | rneovim-ef7af078ef41fabbf3ca9d25acb6a1062a0716a7.tar.gz rneovim-ef7af078ef41fabbf3ca9d25acb6a1062a0716a7.tar.bz2 rneovim-ef7af078ef41fabbf3ca9d25acb6a1062a0716a7.zip |
vim-patch:cd5c8f825078
Update runtime files.
https://github.com/vim/vim/commit/cd5c8f82507822467232ab71e1ebbaae19595916
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 319ae26060..d9b47a3ab0 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4078,13 +4078,16 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* getcurpos() Get the position of the cursor. This is like getpos('.'), but includes an extra item in the list: [bufnum, lnum, col, off, curswant] ~ - The "curswant" number is the preferred column when moving the - cursor vertically. - This can be used to save and restore the cursor position: > - let save_cursor = getcurpos() - MoveTheCursorAround - call setpos('.', save_cursor) -< + The "curswant" number is the preferred column when moving the + cursor vertically. Also see |getpos()|. + + This can be used to save and restore the cursor position: > + let save_cursor = getcurpos() + MoveTheCursorAround + call setpos('.', save_cursor) +< Note that this only works within the window. See + |winrestview()| for restoring more state. + getcwd([{winnr}[, {tabnr}]]) *getcwd()* With no arguments the result is a String, which is the name of the current effective working directory. With {winnr} or @@ -4382,11 +4385,13 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* getwinposx() The result is a Number, which is the X coordinate in pixels of the left hand side of the GUI Vim window. The result will be -1 if the information is not available. + The value can be used with `:winpos`. *getwinposy()* getwinposy() The result is a Number, which is the Y coordinate in pixels of the top of the GUI Vim window. The result will be -1 if the information is not available. + The value can be used with `:winpos`. getwininfo([{winid}]) *getwininfo()* Returns information about windows as a List with Dictionaries. @@ -8271,7 +8276,7 @@ lispindent Compiled with support for lisp indenting. listcmds Compiled with commands for the buffer list |:files| and the argument list |arglist|. localmap Compiled with local mappings and abbr. |:map-local| -mac macOS version of Vim. +mac macOS version of Nvim. menu Compiled with support for |:menu|. mksession Compiled with support for |:mksession|. modify_fname Compiled with file name modifiers. |filename-modifiers| @@ -10417,6 +10422,22 @@ missing: > : echo "You will _never_ see this message" :endif +To execute a command only when the |+eval| feature is disabled requires a trick, +as this example shows: > + if 1 + nnoremap : :" + endif + normal :set history=111<CR> + if 1 + nunmap : + endif + +The "<CR>" here is a real CR character, type CTRL-V Enter to get it. + +When the |+eval| feature is available the ":" is remapped to add a double +quote, which has the effect of commenging-out the command. without the +|+eval| feature the nnoremap command is skipped and the command is executed. + ============================================================================== 11. The sandbox *eval-sandbox* *sandbox* *E48* |