aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
Commit message (Collapse)AuthorAge
...
* options: fix 'isident' for WindowsJan Edmund Lazo2020-08-02
| | | | Default value on Windows does not match the documented value.
* TUI: do not use "nvim_get_option" in tui threaderw72020-03-21
| | | | | | Since "nvim_get_option" is executed on the tui thread as a C function instead of msgpack-rpc, it accesses global variables that may change on the main thread.
* vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local ↵Will Eccles2020-03-17
| | | | | | | | | | (#11854) Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff' Author: Bram Moolenar https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
* foldcolumn: allow auto:XMatthieu Coudron2020-02-29
| | | | | | | | Similar to signcolumn, allow foldcolumn to adapt itself to the number of folds. Regression: vim supports a maximum fdc of 12, this limits it to 9.
* restore old 'termencoding' behaviorBjörn Linse2020-01-19
| | | | | | | | | | | | | | | | | | | | | | Partially reverts #11647. Replaces #11662 The old implementation was removed without clear motivation. The "term option" hackaround added in its place is neither shorter nor simpler. The new behavior breaks even init.vim that expliticly check against it: if exists('&termencoding') set termencoding=utf-8 endif There was nothing wrong with the 0.4.x behavior. Empty &tenc has indicated that the &enc value should be used for all the history of Nvim. Ignoring setting the option is the expected behavior for Vim versions that does not support the option (and Nvim is such a version) 'tenc' was also irrelevant to the Test_unicode python3 test. The reason this has to be disabled is that neovim can't change internal 'encoding'
* vim-patch:8.2.0074: Python 3 unicode test someitmes failsJan Edmund Lazo2020-01-01
| | | | | | Problem: Python 3 unicode test someitmes fails. Solution: Make 'termencoding' empty. Correct number of error message. https://github.com/vim/vim/commit/4b7cdca23035eacf6cd0e30b90546cf32f7efe9e
* vim-patch:8.0.1495: having 'pumwidth' default to zero has no meritJan Edmund Lazo2019-12-29
| | | | | | | | | Problem: Having 'pumwidth' default to zero has no merit. Solution: Make the default 15, as the actual default value. https://github.com/vim/vim/commit/42443c7d7fecc3a2a72154bb6139b028438617c2 Includes 'pumwidth' documentation changes from 8.0.1531. Sort 'pum*' option in alphabetical order.
* vim-patch:8.0.1491: the minimum width of the popup menu is hard codedJan Edmund Lazo2019-12-29
| | | | | | | Problem: The minimum width of the popup menu is hard coded. Solution: Add the 'pumwidth' option. (Christian Brabandt, James McCoy, closes vim/vim#2314) https://github.com/vim/vim/commit/a8f04aa275984183bab5bb583b128f38c64abb69
* jumplist: browser-style (or 'tagstack') navigation #11530butwerenotthereyet2019-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally, when navigating to a specific location from the middle of the jumplist results in shifting the current location to the bottom of the list and adding the new location after it. This behavior is not desireable to all users--see, for example https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior. Here, another jumplist behavior is introduced. When jumpoptions (a new option set added here) includes stack, the jumplist behaves like the tagstack or like history in a web browser. That is, when navigating to a location from the middle of the jumplist 2 first 1 second 0 third <-- current location 1 fourth 2 fifth to a new location the locations after the current location in the jump list are discarded 2 first 1 second 0 third <-- current location The result is that when moving forward from that location, the new location will be appended to the jumplist: 3 first 2 second 1 third 0 new If the new location is the same new == second as some previous (but not immediately prior) entry in the jumplist, 2 first 1 second 0 third <-- current location 1 fourth 2 fifth both occurrences preserved 3 first 2 second 1 third 0 second (new) when moving forward from that location. It would be desireable to go farther and, when the new location is the same as the location that is currently next in the jumplist, new == fourth make the result of navigating to the new location by jumping (e.g. 50gg) be the same as moving forward in the jumplist 2 first 1 second 0 third 1 new <-- current location 2 fifth and simply increment the jumplist index. That change is NOT part of this patch because it would require passing the new cursor location to the function (setpcmark) from all of its callees. That in turn would require those callees to know *before* calling what the new cursor location is, which do they do not currently.
* defaults: set nostartofline (#11135)Justin M. Keyes2019-12-03
|\ | | | | | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
| * defaults: set nostartoflineMatthieu Coudron2019-12-03
| | | | | | | | | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
* | options: make 'fillchars' and 'listchars' global-localBjörn Linse2019-11-26
|/ | | | | | | | | These options were previously global. A global-local window option behaves closer to a global option "per default" (i e with :set), but still supports local behavior via :setl Also this restores back-compat for nvim_set_option("fcs", ...) which are currently broken on 0.4.x but worked in earlier versions
* vim-patch:8.1.2289: after :diffsplit closing the window does not disable diffJan Edmund Lazo2019-11-16
| | | | | | Problem: After :diffsplit closing the window does not disable diff. Solution: Add "closeoff" to 'diffopt' and add it to the default. https://github.com/vim/vim/commit/c8234779790dd873acb88331c50988adf94cc383
* vim-patch:8.1.1228: not possible to process tags with a functionRob Pilling2019-10-22
| | | | | | Problem: Not possible to process tags with a function. Solution: Add tagfunc() (Christian Brabandt, Andy Massimino, closes vim/vim#4010) https://github.com/vim/vim/commit/45e18cbdc40afd8144d20dcc07ad2d981636f4c9
* findoption_len: treat viminfo/viminfofile as aliasesDaniel Hahler2019-08-26
| | | | Ref: https://github.com/neovim/neovim/pull/10672#issuecomment-524716824
* vim-patch:8.1.0754: preferred column when setting 'cursorcolumn' #10549Jan Edmund Lazo2019-07-20
| | | | | | Problem: Preferred column is lost when setting 'cursorcolumn'. Solution: Change option flag to P_RWINONLY. (Takayuki Kurosawa, closes vim/vim#3806) https://github.com/vim/vim/commit/177ab9e0262b1b3a6120bea655864ead487210e5
* refactor: use int for Columns and RowsBjörn Linse2019-07-19
|
* ui: add 'redrawdebug' option for flexible debugging of redrawingBjörn Linse2019-07-09
|
* Improve luacheck setup [skip appveyor]Daniel Hahler2019-07-04
| | | | | | | | - Move .luacheckrc to root, add read_globals=vim - Simplify lualint target, run it on all lua files - Lint preload.lua, but ignore W211 - Remove testlint target, included in lualint (and lint) - Clean up .luacheckrc
* Fix luacheck errors for all Lua source filesSameed Ali2019-07-04
|
* defaults: wildoptions=pum,tagfile #10384Justin M. Keyes2019-07-01
| | | ref #6289
* ui: add 'winblend' to support blending of floating windowsBjörn Linse2019-06-25
| | | | Also add `hi blend=` attribute to override transparency of indiviual attributes.
* vim-patch:8.1.1367: can set 'modelineexpr' in modelineJames McCoy2019-06-24
| | | | | | Problem: can set 'modelineexpr' in modeline. Solution: Add P_SECURE flag. https://github.com/vim/vim/commit/7e800c6047c8a9cc3e5cbc019a4dc91ec36616b1
* vim-patch:8.1.1366: using expressions in a modeline is unsafeJames McCoy2019-06-24
| | | | | | | Problem: Using expressions in a modeline is unsafe. Solution: Disallow using expressions in a modeline, unless the 'modelineexpr' option is set. Update help, add more tests. https://github.com/vim/vim/commit/110289e78195b6d01e1e6ad26ad450de476d41c1
* defaults: exclude "S" from 'shortmess' #10136Justin M. Keyes2019-06-07
| | | ref #6289
* vim-patch:8.1.1270: cannot see current match positionerw72019-06-05
| | | | | | | Problem: Cannot see current match position. Solution: Show "3/44" when using the "n" command and "S" is not in 'shortmess'. (Christian Brabandt, closes vim/vim#4317) https://github.com/vim/vim/commit/9dfa3139198b38b28673e251a3756430065914e9
* vim-patch:8.0.0716: "--clean", 'shadafile' #9907Justin M. Keyes2019-04-15
| | | | | | | | | | | | Nvim notes: - Nvim does not support "-u DEFAULTS", that change is omitted. - Also add 'shadafile' as an alias to 'viminfofile'. - Deprecate 'viminfofile'. Problem: Not easy to start Vim cleanly without changing the viminfo file. Not possible to know whether the -i command line flag was used. Solution: Add the --clean command line argument. Add the 'viminfofile' option. Add "-u DEFAULTS". https://github.com/vim/vim/commit/c4da113ef98dcfd6f2a088b1693c0317dcb5bf42
* options: comma-separated options don't allow duplicates (#9891)Marco Hinz2019-04-12
| | | Closes https://github.com/neovim/neovim/issues/9890
* vim-patch:8.1.0858: 'indentkeys' and 'cinkeys' defaults are differentJan Edmund Lazo2019-03-17
| | | | | | Problem: 'indentkeys' and 'cinkeys' defaults are different. Solution: Make them the same, update docs. (close vim/vim#3882) https://github.com/vim/vim/commit/ce655743ba5c56c00769e57e6a6608c0088211ab
* Allow using internal popupmenu or ext_popupmenu for wildmenuBjörn Linse2019-03-16
| | | | | Deprecate ext_wildmenu. ext_popupmenu already contains more state (anchor position), and will allow further expansion (info about items).
* vim-patch:8.1.0932: remove Farsi support (#9622)Justin M. Keyes2019-02-17
| | | | | Problem: Farsi support is outdated and unused. Solution: Delete the Farsi support. https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
* UI: implement 'pumblend' option for semi-transparent popupmenuBjörn Linse2019-02-07
| | | | | | | | | | | | | Why? - Because we can. - Because the TUI is just another GUI™ - Because it looks kinda nice, and provides useful context like 1 out of 100 times Complies with "don't pay for what you don't use". Some crashes for resizing were unfolded, add tests for those.
* options: set 'scrollback' to -1 by default #9563Marco Hinz2019-02-04
| | | | | | | | | Makes the 'scrollback' option more consistent (same default for all buffers) and future-proof. - Default to -1 for all buffers, but treat it as an implementation detail. - Document range of 1 - 100_000. - New terminal buffer by default sets scrollback=10_000 if the global default is -1. - Existing terminal buffer: On entering terminal-mode or on refresh, if the user explicitly did `:set[local] scbk=-1`, the local value goes to 100_000 (max). (This is undocumented on purpose. Users should work with explicit values in the range of 1-100_000.)
* vim-patch:8.0.1114: default for 'iminsert' is annoyingJan Edmund Lazo2019-02-03
| | | | | | Problem: Default for 'iminsert' is annoying. Solution: Make the default always zero. (Yasuhiro Matsumoto, closes vim/vim#2071) https://github.com/vim/vim/commit/4cf56bbc85f77846aeb378cfb071677336dfad6d
* options: make 'fillchars'/'listchars' local to windowMarco Hinz2019-01-26
| | | | | | | | | | Using 'listchars' is a nice way to highlight tabs that were included by accident for buffers that set 'expandtab'. But maybe one does not want this for buffers that set 'noexpandtab', so now one can use: autocmd FileType go let &l:listchars .= ',tab: '
* vim-patch:8.0.0251: not easy to select Python 2 or 3 (#9173)David Jimenez2019-01-02
| | | | | | Problem: It is not so easy to write a script that works with both Python 2 and Python 3, even when the Python code works with both. Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata) https://github.com/vim/vim/commit/f42dd3c3901ea0ba38e67a616aea9953cae81b8d
* vim-patch:8.1.0360: using an external diff program is slow and inflexibleAnatolii Sakhnik2018-12-09
| | | | | | | | | | | | | | | | | | Problem: Using an external diff program is slow and inflexible. Solution: Include the xdiff library. (Christian Brabandt) Use it by default. https://github.com/vim/vim/commit/e828b7621cf9065a3582be0c4dd1e0e846e335bf vim-patch:8.1.0360 vim-patch:8.1.0364 vim-patch:8.1.0366 vim-patch:8.1.0370 vim-patch:8.1.0377 vim-patch:8.1.0378 vim-patch:8.1.0381 vim-patch:8.1.0396 vim-patch:8.1.0432
* defaults: background=dark #2894 (#9205)Justin M. Keyes2018-11-20
| | | | | | | | | | | | | By historical accident, Nvim defaults to background=light. So on a dark background, `:colorscheme default` looks completely wrong. The "smart" logic that Vim uses is confusing for anyone who uses Vim on multiple platforms, so rather than mimic that, pick the (hopefully) most common default. - Since Neovim is dark-powered, we assume most users have dark backgrounds. - Most of the GUIs tend to have a dark background by default. ref #6289
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.
* options: do not use gettext for +printheader (#8928)Jan Edmund Lazo2018-08-28
| | | It is not translatable as of vim-patch:8.0.1001.
* vim-patch:8.0.1001: setting 'encoding' makes 'printheader' invalid (#8925)Jan Edmund Lazo2018-08-28
| | | | | | Problem: Setting 'encoding' makes 'printheader' invalid. Solution: Do not translate the default value of 'printheader'. (Yasuhiro Matsumoto, closes vim/vim#2026) https://github.com/vim/vim/commit/0903d56f5ca69bb1fa0bbb00ed2a3d9c4d06ddb4
* defaults: win: 'shellpipe' for cmd.exe (#8827)Jan Edmund Lazo2018-08-08
| | | ">%s 2>&1" redirects stderr to a file, same as 'shellredir' on Windows.
* defaults: shortmess+=F (#8619)Justin M. Keyes2018-06-22
| | | | | | Because we default to laststatus=2 (statusline is always visible), the :edit message is not useful. ref #6289
* options: remove 'maxcombine` option (always use 6)Björn Linse2018-06-13
|
* vim-patch:8.0.1237: ":set scroll&" often gives an error (#8473)Jan Edmund Lazo2018-06-04
| | | | | | | Problem: ":set scroll&" often gives an error. Solution: Don't use a fixed default value, use half the window height. Add a test. (Ozaki Kiichi, closes vim/vim#2104) https://github.com/vim/vim/commit/af2d20c6285c1d2973e3d9b5e8f727e3ed180493
* Merge #4486 'refactor: Remove maxmem, maxmemtot options'Justin M. Keyes2018-05-02
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this change we never release blocks from memory (in practice it never happened because the memory limits are never reached). Let the OS take care of that. --- On today's systems the 'maxmem' and 'maxmemtot' values are huge (4+ GB) so the limits are never reached in practice, but Vim wastes a lot of time checking if the limit was reached. If the limit is reached Vim starts saving pieces of the swap file that were in memory to the disk. Said in a different way: Vim implements its own memory-paging mechanism. This is unnecessary and inefficient since the operating system already has virtual memory and will swap to the disk if programs start using too much memory. This change does... 1. Reduce the number of config options and need for documentation. 2. Make the code more efficient as we don't have to keep track of memory usage nor check if the memory limits were reached to start swapping to disk every time we need memory for buffers. 3. Simplify the code. Once memfile.c is simple enough it could be replaced by actual operating system memory mapping (mmap, MemoryViewOfFile...). This change does not prevent Vim to recover changes from swap files since the swapping code is never triggered with the huge limits set by default.
| * Remove maxmem and maxmemtot optionsFelipe Oliveira Carvalho2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > The option 'maxmem' ('mm') is used to set the maximum memory used for one > buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for > all buffers (in kilobytes). The defaults depend on the system used. These > are not hard limits, but tell Vim when to move text into a swap file. If you > don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a very large > value. The swap file will then only be used for recovery. If you don't want > a swap file at all, set 'updatecount' to 0, or use the "-n" argument when > starting Vim. On today's systems these values are huge (4GB in my machine with 8GB of RAM since it's set as half the available memory by default) so the limits are never reached in practice, but Vim wastes a lot of time checking if the limit was reached. If the limit is reached Vim starts saving pieces of the swap file that were in memory to the disk. Said in a different way: Vim implements its own memory swapping mechanism. This is unnecessary and inefficient since the operating system already virtualized the memory and will swap to the disk if programs start using too much memory. This change does... 1. Reduce the number of config options and need for documentation. 2. Make the code more efficient as we don't have to keep track of memory usage nor check if the memory limits were reached to start swapping to disk every time we need memory for buffers. 3. Simplify the code. Once `memfile.c` is simple enough it could be replaced by actual operating system memory mapping (`mmap`, `MemoryViewOfFile`...). This change does not prevent Vim to recover changes from swap files since the swapping code is never triggered with the huge limits set by default.
* | defaults: disable 'fsync'Justin M. Keyes2018-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ref #6725 fsync() is very slow on some systems. And since the parent commit, Nvim is smarter about flushing files at certain times (e.g. CursorHold), regardless of whether 'fsync' is enabled. So it's less risky to disable 'fsync'. Profiling showed slow (2-4s) :write and :quit caused by fsync(): :quit shada_write_file(NULL, false); :write + fsync 0 0x00007f72da567b2d in fsync () at ../sysdeps/unix/syscall-template.S:84 1 0x0000000000638970 in uv__fs_fsync (req=<optimized out>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:150 2 uv__fs_work (w=<optimized out>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:953 3 0x0000000000639a70 in uv_fs_fsync (loop=<optimized out>, req=<optimized out>, file=41, cb=0x7f72da567b2d <fsync+45>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:1094 4 0x0000000000573694 in os_fsync (fd=41) at ../src/nvim/os/fs.c:631 5 0x00000000004ec9dc in buf_write (buf=<optimized out>, fname=<optimized out>, sfname=<optimized out>, start=1, end=1997, eap=0x7fffc864c570, append=<optimized out>, forceit=<optimized out>, reset_changed=<optimized out>, filtering=<optimized out>) at ../src/nvim/fileio.c:3387 6 0x00000000004b44ff in do_write (eap=0x7fffc864c570) at ../src/nvim/ex_cmds.c:1745 ... :write + nofsync 0 0x00007f72da567b2d in fsync () at ../sysdeps/unix/syscall-template.S:84 1 0x0000000000638970 in uv__fs_fsync (req=<optimized out>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:150 2 uv__fs_work (w=<optimized out>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:953 3 0x0000000000639a70 in uv_fs_fsync (loop=<optimized out>, req=<optimized out>, file=36, cb=0x7f72da567b2d <fsync+45>) at /home/vagrant/neovim/.deps/build/src/libuv/src/unix/fs.c:1094 4 0x0000000000573694 in os_fsync (fd=36) at ../src/nvim/os/fs.c:631 5 0x0000000000528f5a in mf_sync (mfp=0x7f72d8968d00, flags=5) at ../src/nvim/memfile.c:466 6 0x000000000052d569 in ml_preserve (buf=0x7f72d890f000, message=0) at ../src/nvim/memline.c:1659 7 0x00000000004ebadf in buf_write (buf=<optimized out>, fname=<optimized out>, sfname=<optimized out>, start=1, end=1997, eap=0x7fffc864c570, append=<optimized out>, forceit=<optimized out>, reset_changed=<optimized out>, filtering=<optimized out>) at ../src/nvim/fileio.c:3071 8 0x00000000004b44ff in do_write (eap=0x7fffc864c570) at ../src/nvim/ex_cmds.c:1745 ...
* | msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
| |
* | win: defaults: 'shellcmdflag', 'shellxquote' #7343Jan Edmund Lazo2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #7698 Wrapping a command in double-quotes allows cmd.exe to safely dequote the entire command as if the user entered the entire command in an interactive prompt. This reduces the need to escape nested and uneven double quotes. The `/s` flag of cmd.exe makes the behaviour more reliable: :set shellcmdflag=/s\ /c Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to cmd.exe `echo` builtin) even if it is wrapped in double quotes. Example: :: internal echo > cmd /s /c " echo foo\:bar" " foo\:bar" :: cygwin echo.exe > cmd /s /c " "echo" foo\:bar" " foo:bar