├── README.md ├── doc ├── api.jax ├── api.txt ├── arabic.jax ├── arabic.txt ├── autocmd.jax ├── autocmd.txt ├── change.jax ├── change.txt ├── channel.jax ├── channel.txt ├── cmdline.jax ├── cmdline.txt ├── debug.jax ├── debug.txt ├── deprecated.jax ├── deprecated.txt ├── develop.jax ├── develop.txt ├── diff.jax ├── diff.txt ├── digraph.jax ├── digraph.txt ├── editing.jax ├── editing.txt ├── eval.jax ├── eval.txt ├── filetype.jax ├── filetype.txt ├── fold.jax ├── fold.txt ├── ft_ada.jax ├── ft_ada.txt ├── ft_rust.jax ├── ft_rust.txt ├── ft_sql.jax ├── ft_sql.txt ├── gui.jax ├── gui.txt ├── hebrew.jax ├── hebrew.txt ├── help.jax ├── help.txt ├── helphelp.jax ├── helphelp.txt ├── if_cscop.jax ├── if_cscop.txt ├── if_lua.jax ├── if_lua.txt ├── if_pyth.jax ├── if_pyth.txt ├── if_ruby.jax ├── if_ruby.txt ├── indent.jax ├── indent.txt ├── index.jax ├── index.txt ├── insert.jax ├── insert.txt ├── intro.jax ├── intro.txt ├── job_control.jax ├── job_control.txt ├── lsp.jax ├── lsp.txt ├── lua.jax ├── lua.txt ├── map.jax ├── map.txt ├── mbyte.jax ├── mbyte.txt ├── message.jax ├── message.txt ├── mlang.jax ├── mlang.txt ├── motion.jax ├── motion.txt ├── msgpack_rpc.jax ├── msgpack_rpc.txt ├── nvim.jax ├── nvim.txt ├── nvim_terminal_emulator.jax ├── nvim_terminal_emulator.txt ├── options.jax ├── options.txt ├── pattern.jax ├── pattern.txt ├── pi_gzip.jax ├── pi_gzip.txt ├── pi_health.jax ├── pi_health.txt ├── pi_msgpack.jax ├── pi_msgpack.txt ├── pi_netrw.jax ├── pi_netrw.txt ├── pi_paren.jax ├── pi_paren.txt ├── pi_spec.jax ├── pi_spec.txt ├── pi_tar.jax ├── pi_tar.txt ├── pi_tutor.jax ├── pi_tutor.txt ├── pi_zip.jax ├── pi_zip.txt ├── print.jax ├── print.txt ├── provider.jax ├── provider.txt ├── quickfix.jax ├── quickfix.txt ├── quickref.jax ├── quickref.txt ├── recover.jax ├── recover.txt ├── remote.jax ├── remote.txt ├── remote_plugin.jax ├── remote_plugin.txt ├── repeat.jax ├── repeat.txt ├── rileft.jax ├── rileft.txt ├── russian.jax ├── russian.txt ├── scroll.jax ├── scroll.txt ├── sign.jax ├── sign.txt ├── spell.jax ├── spell.txt ├── starting.jax ├── starting.txt ├── syntax.jax ├── syntax.txt ├── tabpage.jax ├── tabpage.txt ├── tags ├── tags-ja ├── tagsrch.jax ├── tagsrch.txt ├── term.jax ├── term.txt ├── tips.jax ├── tips.txt ├── uganda.jax ├── uganda.txt ├── ui.jax ├── ui.txt ├── undo.jax ├── undo.txt ├── usr_01.jax ├── usr_01.txt ├── usr_02.jax ├── usr_02.txt ├── usr_03.jax ├── usr_03.txt ├── usr_04.jax ├── usr_04.txt ├── usr_05.jax ├── usr_05.txt ├── usr_06.jax ├── usr_06.txt ├── usr_07.jax ├── usr_07.txt ├── usr_08.jax ├── usr_08.txt ├── usr_09.jax ├── usr_09.txt ├── usr_10.jax ├── usr_10.txt ├── usr_11.jax ├── usr_11.txt ├── usr_12.jax ├── usr_12.txt ├── usr_20.jax ├── usr_20.txt ├── usr_21.jax ├── usr_21.txt ├── usr_22.jax ├── usr_22.txt ├── usr_23.jax ├── usr_23.txt ├── usr_24.jax ├── usr_24.txt ├── usr_25.jax ├── usr_25.txt ├── usr_26.jax ├── usr_26.txt ├── usr_27.jax ├── usr_27.txt ├── usr_28.jax ├── usr_28.txt ├── usr_29.jax ├── usr_29.txt ├── usr_30.jax ├── usr_30.txt ├── usr_31.jax ├── usr_31.txt ├── usr_32.jax ├── usr_32.txt ├── usr_40.jax ├── usr_40.txt ├── usr_41.jax ├── usr_41.txt ├── usr_42.jax ├── usr_42.txt ├── usr_43.jax ├── usr_43.txt ├── usr_44.jax ├── usr_44.txt ├── usr_45.jax ├── usr_45.txt ├── usr_toc.jax ├── usr_toc.txt ├── various.jax ├── various.txt ├── vi_diff.jax ├── vi_diff.txt ├── vim_diff.jax ├── vim_diff.txt ├── visual.jax ├── visual.txt ├── windows.jax └── windows.txt └── duplicate_jax.sh /README.md: -------------------------------------------------------------------------------- 1 | # nvimdoc-ja 2 | neovimヘルプの日本語翻訳です 3 | 4 | 現在、lua.jaxの翻訳を進めています。 5 | -------------------------------------------------------------------------------- /doc/channel.jax: -------------------------------------------------------------------------------- 1 | *channel.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim asynchronous IO *channel* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | ============================================================================== 12 | 1. Introduction *channel-intro* 13 | 14 | Channels are nvim's way of communicating with external processes. 15 | 16 | There are several ways to open a channel: 17 | 18 | 1. Through stdin/stdout when `nvim` is started with `--headless`, and a startup 19 | script or --cmd command opens the stdio channel using |stdioopen()|. 20 | 21 | 2. Through stdin, stdout and stderr of a process spawned by |jobstart()|. 22 | 23 | 3. Through the PTY master end of a PTY opened with 24 | `jobstart(..., {'pty': v:true})` or |termopen()|. 25 | 26 | 4. By connecting to a TCP/IP socket or named pipe with |sockconnect()|. 27 | 28 | 5. By another process connecting to a socket listened to by nvim. This only 29 | supports RPC channels, see |rpc-connecting|. 30 | 31 | Channels support multiple modes or protocols. In the most basic 32 | mode of operation, raw bytes are read and written to the channel. 33 | The |RPC| protocol, based on the msgpack-rpc standard, enables nvim and the 34 | process at the other end to send remote calls and events to each other. 35 | The builtin |terminal-emulator| is also implemented on top of PTY channels. 36 | 37 | Channel Id *channel-id* 38 | 39 | Each channel is identified by an integer id, unique for the life of the 40 | current Nvim session. Functions like |stdioopen()| return channel ids; 41 | functions like |chansend()| consume channel ids. 42 | 43 | ============================================================================== 44 | 2. Reading and writing raw bytes *channel-bytes* 45 | 46 | Channels opened by Vimscript functions operate with raw bytes by default. For 47 | a job channel using RPC, bytes can still be read over its stderr. Similarily, 48 | only bytes can be written to Nvim's own stderr. 49 | 50 | *channel-callback* 51 | on_stdout({chan-id}, {data}, {name}) *on_stdout* 52 | on_stderr({chan-id}, {data}, {name}) *on_stderr* 53 | on_stdin({chan-id}, {data}, {name}) *on_stdin* 54 | on_data({chan-id}, {data}, {name}) *on_data* 55 | Scripts can react to channel activity (received data) via callback 56 | functions assigned to the `on_stdout`, `on_stderr`, `on_stdin`, or 57 | `on_data` option keys. Callbacks should be fast: avoid potentially 58 | slow/expensive work. 59 | 60 | Parameters: ~ 61 | {chan-id} Channel handle. |channel-id| 62 | {data} Raw data (|readfile()|-style list of strings) read from 63 | the channel. EOF is a single-item list: `['']`. First and 64 | last items may be partial lines! |channel-lines| 65 | {name} Stream name (string) like "stdout", so the same function 66 | can handle multiple streams. Event names depend on how the 67 | channel was opened and in what mode/protocol. 68 | 69 | *channel-buffered* 70 | The callback is invoked immediately as data is available, where 71 | a single-item list `['']` indicates EOF (stream closed). Alternatively 72 | set the `stdout_buffered`, `stderr_buffered`, `stdin_buffered`, or 73 | `data_buffered` option keys to invoke the callback only after all output 74 | was gathered and the stream was closed. 75 | *E5210* 76 | If a buffering mode is used without a callback, the data is saved in the 77 | stream {name} key of the options dict. It is an error if the key exists. 78 | 79 | *channel-lines* 80 | Stream event handlers receive data as it becomes available from the OS, 81 | thus the first and last items in the {data} list may be partial lines. 82 | Empty string completes the previous partial line. Examples (not including 83 | the final `['']` emitted at EOF): 84 | - `foobar` may arrive as `['fo'], ['obar']` 85 | - `foo\nbar` may arrive as 86 | `['foo','bar']` 87 | or `['foo',''], ['bar']` 88 | or `['foo'], ['','bar']` 89 | or `['fo'], ['o','bar']` 90 | There are two ways to deal with this: 91 | 1. To wait for the entire output, use |channel-buffered| mode. 92 | 2. To read line-by-line, use the following code: > 93 | let s:lines = [''] 94 | func! s:on_event(job_id, data, event) dict 95 | let eof = (a:data == ['']) 96 | " Complete the previous line. 97 | let s:lines[-1] .= a:data[0] 98 | " Append (last item may be a partial line, until EOF). 99 | call extend(s:lines, a:data[1:]) 100 | endf 101 | < 102 | 103 | If the callback functions are |Dictionary-function|s, |self| refers to the 104 | options dictionary containing the callbacks. |Partial|s can also be used as 105 | callbacks. 106 | 107 | Data can be sent to the channel using the |chansend()| function. Here is a 108 | simple example, echoing some data through a cat-process: 109 | > 110 | function! s:OnEvent(id, data, event) dict 111 | let str = join(a:data, "\n") 112 | echomsg str 113 | endfunction 114 | let id = jobstart(['cat'], {'on_stdout': function('s:OnEvent') } ) 115 | call chansend(id, "hello!") 116 | < 117 | 118 | Here is a example of setting a buffer to the result of grep, but only after 119 | all data has been processed: 120 | > 121 | function! s:OnEvent(id, data, event) dict 122 | call nvim_buf_set_lines(2, 0, -1, v:true, a:data) 123 | endfunction 124 | let id = jobstart(['grep', '^[0-9]'], { 'on_stdout': function('s:OnEvent'), 125 | \ 'stdout_buffered':v:true } ) 126 | 127 | call chansend(id, "stuff\n10 PRINT \"NVIM\"\nxx") 128 | " no output is received, buffer is empty 129 | 130 | call chansend(id, "xx\n20 GOTO 10\nzz\n") 131 | call chanclose(id, 'stdin') 132 | " now buffer has result 133 | < 134 | For additional examples with jobs, see |job-control|. 135 | 136 | *channel-pty* 137 | Special case: PTY channels opened with `jobstart(..., {'pty': v:true})` do not 138 | preprocess ANSI escape sequences, these will be sent raw to the callback. 139 | However, change of PTY size can be signaled to the slave using |jobresize()|. 140 | See also |terminal-emulator|. 141 | 142 | Terminal characteristics (termios) for |:terminal| and PTY channels are copied 143 | from the host TTY, or if Nvim is |--headless| it uses default values: > 144 | :echo system('nvim --headless +"te stty -a" +"sleep 1" +"1,/^$/print" +q') 145 | 146 | ============================================================================== 147 | 3. Communicating using msgpack-rpc *channel-rpc* 148 | 149 | When channels are opened with the `rpc` option set to true, the channel can be 150 | used for remote method calls in both directions, see |msgpack-rpc|. Note that 151 | rpc channels are implicitly trusted and the process at the other end can 152 | invoke any |api| function! 153 | 154 | ============================================================================== 155 | 4. Standard IO channel *channel-stdio* 156 | 157 | Nvim uses stdin/stdout to interact with the user over the terminal interface 158 | (TUI). If Nvim is |--headless| the TUI is not started and stdin/stdout can be 159 | used as a channel. See also |--embed|. 160 | 161 | Call |stdioopen()| during |startup| to open the stdio channel as |channel-id| 1. 162 | Nvim's stderr is always available as |v:stderr|, a write-only bytes channel. 163 | 164 | Example: > 165 | func! OnEvent(id, data, event) 166 | if a:data == [""] 167 | quit 168 | end 169 | call chansend(a:id, map(a:data, {i,v -> toupper(v)})) 170 | endfunc 171 | call stdioopen({'on_stdin': 'OnEvent'}) 172 | < 173 | Put this in `uppercase.vim` and run: > 174 | nvim --headless --cmd "source uppercase.vim" 175 | 176 | ============================================================================== 177 | vim:tw=78:ts=8:noet:ft=help:norl: 178 | -------------------------------------------------------------------------------- /doc/channel.txt: -------------------------------------------------------------------------------- 1 | *channel.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim asynchronous IO *channel* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | ============================================================================== 12 | 1. Introduction *channel-intro* 13 | 14 | Channels are nvim's way of communicating with external processes. 15 | 16 | There are several ways to open a channel: 17 | 18 | 1. Through stdin/stdout when `nvim` is started with `--headless`, and a startup 19 | script or --cmd command opens the stdio channel using |stdioopen()|. 20 | 21 | 2. Through stdin, stdout and stderr of a process spawned by |jobstart()|. 22 | 23 | 3. Through the PTY master end of a PTY opened with 24 | `jobstart(..., {'pty': v:true})` or |termopen()|. 25 | 26 | 4. By connecting to a TCP/IP socket or named pipe with |sockconnect()|. 27 | 28 | 5. By another process connecting to a socket listened to by nvim. This only 29 | supports RPC channels, see |rpc-connecting|. 30 | 31 | Channels support multiple modes or protocols. In the most basic 32 | mode of operation, raw bytes are read and written to the channel. 33 | The |RPC| protocol, based on the msgpack-rpc standard, enables nvim and the 34 | process at the other end to send remote calls and events to each other. 35 | The builtin |terminal-emulator| is also implemented on top of PTY channels. 36 | 37 | Channel Id *channel-id* 38 | 39 | Each channel is identified by an integer id, unique for the life of the 40 | current Nvim session. Functions like |stdioopen()| return channel ids; 41 | functions like |chansend()| consume channel ids. 42 | 43 | ============================================================================== 44 | 2. Reading and writing raw bytes *channel-bytes* 45 | 46 | Channels opened by Vimscript functions operate with raw bytes by default. For 47 | a job channel using RPC, bytes can still be read over its stderr. Similarily, 48 | only bytes can be written to Nvim's own stderr. 49 | 50 | *channel-callback* 51 | on_stdout({chan-id}, {data}, {name}) *on_stdout* 52 | on_stderr({chan-id}, {data}, {name}) *on_stderr* 53 | on_stdin({chan-id}, {data}, {name}) *on_stdin* 54 | on_data({chan-id}, {data}, {name}) *on_data* 55 | Scripts can react to channel activity (received data) via callback 56 | functions assigned to the `on_stdout`, `on_stderr`, `on_stdin`, or 57 | `on_data` option keys. Callbacks should be fast: avoid potentially 58 | slow/expensive work. 59 | 60 | Parameters: ~ 61 | {chan-id} Channel handle. |channel-id| 62 | {data} Raw data (|readfile()|-style list of strings) read from 63 | the channel. EOF is a single-item list: `['']`. First and 64 | last items may be partial lines! |channel-lines| 65 | {name} Stream name (string) like "stdout", so the same function 66 | can handle multiple streams. Event names depend on how the 67 | channel was opened and in what mode/protocol. 68 | 69 | *channel-buffered* 70 | The callback is invoked immediately as data is available, where 71 | a single-item list `['']` indicates EOF (stream closed). Alternatively 72 | set the `stdout_buffered`, `stderr_buffered`, `stdin_buffered`, or 73 | `data_buffered` option keys to invoke the callback only after all output 74 | was gathered and the stream was closed. 75 | *E5210* 76 | If a buffering mode is used without a callback, the data is saved in the 77 | stream {name} key of the options dict. It is an error if the key exists. 78 | 79 | *channel-lines* 80 | Stream event handlers receive data as it becomes available from the OS, 81 | thus the first and last items in the {data} list may be partial lines. 82 | Empty string completes the previous partial line. Examples (not including 83 | the final `['']` emitted at EOF): 84 | - `foobar` may arrive as `['fo'], ['obar']` 85 | - `foo\nbar` may arrive as 86 | `['foo','bar']` 87 | or `['foo',''], ['bar']` 88 | or `['foo'], ['','bar']` 89 | or `['fo'], ['o','bar']` 90 | There are two ways to deal with this: 91 | 1. To wait for the entire output, use |channel-buffered| mode. 92 | 2. To read line-by-line, use the following code: > 93 | let s:lines = [''] 94 | func! s:on_event(job_id, data, event) dict 95 | let eof = (a:data == ['']) 96 | " Complete the previous line. 97 | let s:lines[-1] .= a:data[0] 98 | " Append (last item may be a partial line, until EOF). 99 | call extend(s:lines, a:data[1:]) 100 | endf 101 | < 102 | 103 | If the callback functions are |Dictionary-function|s, |self| refers to the 104 | options dictionary containing the callbacks. |Partial|s can also be used as 105 | callbacks. 106 | 107 | Data can be sent to the channel using the |chansend()| function. Here is a 108 | simple example, echoing some data through a cat-process: 109 | > 110 | function! s:OnEvent(id, data, event) dict 111 | let str = join(a:data, "\n") 112 | echomsg str 113 | endfunction 114 | let id = jobstart(['cat'], {'on_stdout': function('s:OnEvent') } ) 115 | call chansend(id, "hello!") 116 | < 117 | 118 | Here is a example of setting a buffer to the result of grep, but only after 119 | all data has been processed: 120 | > 121 | function! s:OnEvent(id, data, event) dict 122 | call nvim_buf_set_lines(2, 0, -1, v:true, a:data) 123 | endfunction 124 | let id = jobstart(['grep', '^[0-9]'], { 'on_stdout': function('s:OnEvent'), 125 | \ 'stdout_buffered':v:true } ) 126 | 127 | call chansend(id, "stuff\n10 PRINT \"NVIM\"\nxx") 128 | " no output is received, buffer is empty 129 | 130 | call chansend(id, "xx\n20 GOTO 10\nzz\n") 131 | call chanclose(id, 'stdin') 132 | " now buffer has result 133 | < 134 | For additional examples with jobs, see |job-control|. 135 | 136 | *channel-pty* 137 | Special case: PTY channels opened with `jobstart(..., {'pty': v:true})` do not 138 | preprocess ANSI escape sequences, these will be sent raw to the callback. 139 | However, change of PTY size can be signaled to the slave using |jobresize()|. 140 | See also |terminal-emulator|. 141 | 142 | Terminal characteristics (termios) for |:terminal| and PTY channels are copied 143 | from the host TTY, or if Nvim is |--headless| it uses default values: > 144 | :echo system('nvim --headless +"te stty -a" +"sleep 1" +"1,/^$/print" +q') 145 | 146 | ============================================================================== 147 | 3. Communicating using msgpack-rpc *channel-rpc* 148 | 149 | When channels are opened with the `rpc` option set to true, the channel can be 150 | used for remote method calls in both directions, see |msgpack-rpc|. Note that 151 | rpc channels are implicitly trusted and the process at the other end can 152 | invoke any |api| function! 153 | 154 | ============================================================================== 155 | 4. Standard IO channel *channel-stdio* 156 | 157 | Nvim uses stdin/stdout to interact with the user over the terminal interface 158 | (TUI). If Nvim is |--headless| the TUI is not started and stdin/stdout can be 159 | used as a channel. See also |--embed|. 160 | 161 | Call |stdioopen()| during |startup| to open the stdio channel as |channel-id| 1. 162 | Nvim's stderr is always available as |v:stderr|, a write-only bytes channel. 163 | 164 | Example: > 165 | func! OnEvent(id, data, event) 166 | if a:data == [""] 167 | quit 168 | end 169 | call chansend(a:id, map(a:data, {i,v -> toupper(v)})) 170 | endfunc 171 | call stdioopen({'on_stdin': 'OnEvent'}) 172 | < 173 | Put this in `uppercase.vim` and run: > 174 | nvim --headless --cmd "source uppercase.vim" 175 | 176 | ============================================================================== 177 | vim:tw=78:ts=8:noet:ft=help:norl: 178 | -------------------------------------------------------------------------------- /doc/debug.jax: -------------------------------------------------------------------------------- 1 | *debug.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Debugging Vim *debug-vim* 8 | 9 | This is for debugging Vim itself, when it doesn't work properly. 10 | For debugging Vim scripts, functions, etc. see |debug-scripts| 11 | 12 | Type |gO| to see the table of contents. 13 | 14 | ============================================================================== 15 | 16 | 1. Location of a crash, using gcc and gdb *debug-gcc* *gdb* 17 | 18 | When Vim crashes in one of the test files, and you are using gcc for 19 | compilation, here is what you can do to find out exactly where Vim crashes. 20 | This also applies when using the MingW tools. 21 | 22 | 1. Compile Vim with the "-g" option (there is a line in the src/Makefile for 23 | this, which you can uncomment). Also make sure "strip" is disabled (do not 24 | install it, or use the line "STRIP = /bin/true"). 25 | 26 | 2. Execute these commands (replace "11" with the test that fails): > 27 | cd testdir 28 | gdb ../vim 29 | run -u unix.vim -U NONE -s dotest.in test11.in 30 | 31 | 3. Check where Vim crashes, gdb should give a message for this. 32 | 33 | 4. Get a stack trace from gdb with this command: > 34 | where 35 | < You can check out different places in the stack trace with: > 36 | frame 3 37 | < Replace "3" with one of the numbers in the stack trace. 38 | 39 | ============================================================================== 40 | 41 | 2. Locating memory leaks *debug-leaks* *valgrind* 42 | 43 | If you suspect Vim is leaking memory and you are using Linux, the valgrind 44 | tool is very useful to pinpoint memory leaks. 45 | 46 | First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE 47 | and uncomment the line. 48 | 49 | Use this command to start Vim: 50 | > 51 | valgrind --log-file=valgrind.log --leak-check=full ./vim 52 | 53 | Note: Vim will run much slower. If your vimrc is big or you have several 54 | plugins you need to be patient for startup, or run with the "-u NONE" 55 | argument. 56 | 57 | There are often a few leaks from libraries, such as getpwuid() and 58 | XtVaAppCreateShell(). Those are unavoidable. The number of bytes should be 59 | very small a Kbyte or less. 60 | 61 | ============================================================================== 62 | 63 | 3. Windows Bug Reporting *debug-win32* 64 | 65 | If the Windows version of Vim crashes in a reproducible manner, you can take 66 | some steps to provide a useful bug report. 67 | 68 | 69 | 3.1 GENERIC ~ 70 | 71 | You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb 72 | for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the 73 | same place that you obtained the executable. Be sure to use the PDB that 74 | matches the EXE (same date). 75 | 76 | If you built the executable yourself with the Microsoft Visual C++ compiler, 77 | then the PDB was built with the EXE. 78 | 79 | If you have Visual Studio, use that instead of the VC Toolkit and WinDbg. 80 | 81 | For other compilers, you should always use the corresponding debugger: gdb 82 | (see above |debug-gcc|) for the Cygwin and MinGW compilers. 83 | 84 | 85 | *debug-vs2005* 86 | 3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~ 87 | 88 | First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't 89 | have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a 90 | free copy of Visual C++ 2005 Express Edition.) 91 | 92 | On the Tools menu, click Attach to Process. Choose the Vim process. 93 | 94 | In Vim, reproduce the crash. A dialog will appear in Visual Studio, telling 95 | you about the unhandled exception in the Vim process. Click Break to break 96 | into the process. 97 | 98 | Visual Studio will pop up another dialog, telling you that no symbols are 99 | loaded and that the source code cannot be displayed. Click OK. 100 | 101 | Several windows will open. Right-click in the Call Stack window. Choose Load 102 | Symbols. The Find Symbols dialog will open, looking for (g)vim.pdb. Navigate 103 | to the directory where you have the PDB file and click Open. 104 | 105 | At this point, you should have a full call stack with vim function names and 106 | line numbers. Double-click one of the lines and the Find Source dialog will 107 | appear. Navigate to the directory where the Vim source is (if you have it.) 108 | 109 | If you don't know how to debug this any further, follow the instructions 110 | at ":help bug-report". Paste the call stack into the bug report. 111 | 112 | If you have a non-free version of Visual Studio, you can save a minidump via 113 | the Debug menu and send it with the bug report. A minidump is a small file 114 | (<100KB), which contains information about the state of your process. 115 | Visual C++ 2005 Express Edition cannot save minidumps and it cannot be 116 | installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you 117 | need to save minidumps or you want a just-in-time (postmortem) debugger. 118 | 119 | *debug-windbg* 120 | 3.3 Debugging Vim crashes with WinDbg ~ 121 | 122 | See |get-ms-debuggers| to obtain a copy of WinDbg. 123 | 124 | As with the Visual Studio IDE, you can attach WinDbg to a running Vim process. 125 | You can also have your system automatically invoke WinDbg as a postmortem 126 | debugger. To set WinDbg as your postmortem debugger, run "windbg -I". 127 | 128 | To attach WinDbg to a running Vim process, launch WinDbg. On the File menu, 129 | choose Attach to a Process. Select the Vim process and click OK. 130 | 131 | At this point, choose Symbol File Path on the File menu, and add the folder 132 | containing your Vim PDB to the sympath. If you have Vim source available, 133 | use Source File Path on the File menu. You can now open source files in WinDbg 134 | and set breakpoints, if you like. Reproduce your crash. WinDbg should open the 135 | source file at the point of the crash. Using the View menu, you can examine 136 | the call stack, local variables, watch windows, and so on. 137 | 138 | If WinDbg is your postmortem debugger, you do not need to attach WinDbg to 139 | your Vim process. Simply reproduce the crash and WinDbg will launch 140 | automatically. As above, set the Symbol File Path and the Source File Path. 141 | 142 | To save a minidump, type the following at the WinDbg command line: > 143 | .dump vim.dmp 144 | < 145 | *debug-minidump* 146 | 3.4 Opening a Minidump ~ 147 | 148 | If you have a minidump file, you can open it in Visual Studio or in WinDbg. 149 | 150 | In Visual Studio 2005: on the File menu, choose Open, then Project/Solution. 151 | Navigate to the .dmp file and open it. Now press F5 to invoke the debugger. 152 | Follow the instructions in |debug-vs2005| to set the Symbol File Path. 153 | 154 | In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in 155 | |debug-windbg| to set the Symbol File Path. 156 | 157 | *get-ms-debuggers* 158 | 3.5 Obtaining Microsoft Debugging Tools ~ 159 | 160 | Visual Studio 2017 Community Edition can be downloaded for free from: 161 | https://visualstudio.microsoft.com/downloads/ 162 | 163 | ========================================================================= 164 | vim:tw=78:ts=8:noet:ft=help:norl: 165 | -------------------------------------------------------------------------------- /doc/debug.txt: -------------------------------------------------------------------------------- 1 | *debug.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Debugging Vim *debug-vim* 8 | 9 | This is for debugging Vim itself, when it doesn't work properly. 10 | For debugging Vim scripts, functions, etc. see |debug-scripts| 11 | 12 | Type |gO| to see the table of contents. 13 | 14 | ============================================================================== 15 | 16 | 1. Location of a crash, using gcc and gdb *debug-gcc* *gdb* 17 | 18 | When Vim crashes in one of the test files, and you are using gcc for 19 | compilation, here is what you can do to find out exactly where Vim crashes. 20 | This also applies when using the MingW tools. 21 | 22 | 1. Compile Vim with the "-g" option (there is a line in the src/Makefile for 23 | this, which you can uncomment). Also make sure "strip" is disabled (do not 24 | install it, or use the line "STRIP = /bin/true"). 25 | 26 | 2. Execute these commands (replace "11" with the test that fails): > 27 | cd testdir 28 | gdb ../vim 29 | run -u unix.vim -U NONE -s dotest.in test11.in 30 | 31 | 3. Check where Vim crashes, gdb should give a message for this. 32 | 33 | 4. Get a stack trace from gdb with this command: > 34 | where 35 | < You can check out different places in the stack trace with: > 36 | frame 3 37 | < Replace "3" with one of the numbers in the stack trace. 38 | 39 | ============================================================================== 40 | 41 | 2. Locating memory leaks *debug-leaks* *valgrind* 42 | 43 | If you suspect Vim is leaking memory and you are using Linux, the valgrind 44 | tool is very useful to pinpoint memory leaks. 45 | 46 | First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE 47 | and uncomment the line. 48 | 49 | Use this command to start Vim: 50 | > 51 | valgrind --log-file=valgrind.log --leak-check=full ./vim 52 | 53 | Note: Vim will run much slower. If your vimrc is big or you have several 54 | plugins you need to be patient for startup, or run with the "-u NONE" 55 | argument. 56 | 57 | There are often a few leaks from libraries, such as getpwuid() and 58 | XtVaAppCreateShell(). Those are unavoidable. The number of bytes should be 59 | very small a Kbyte or less. 60 | 61 | ============================================================================== 62 | 63 | 3. Windows Bug Reporting *debug-win32* 64 | 65 | If the Windows version of Vim crashes in a reproducible manner, you can take 66 | some steps to provide a useful bug report. 67 | 68 | 69 | 3.1 GENERIC ~ 70 | 71 | You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb 72 | for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the 73 | same place that you obtained the executable. Be sure to use the PDB that 74 | matches the EXE (same date). 75 | 76 | If you built the executable yourself with the Microsoft Visual C++ compiler, 77 | then the PDB was built with the EXE. 78 | 79 | If you have Visual Studio, use that instead of the VC Toolkit and WinDbg. 80 | 81 | For other compilers, you should always use the corresponding debugger: gdb 82 | (see above |debug-gcc|) for the Cygwin and MinGW compilers. 83 | 84 | 85 | *debug-vs2005* 86 | 3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~ 87 | 88 | First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't 89 | have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a 90 | free copy of Visual C++ 2005 Express Edition.) 91 | 92 | On the Tools menu, click Attach to Process. Choose the Vim process. 93 | 94 | In Vim, reproduce the crash. A dialog will appear in Visual Studio, telling 95 | you about the unhandled exception in the Vim process. Click Break to break 96 | into the process. 97 | 98 | Visual Studio will pop up another dialog, telling you that no symbols are 99 | loaded and that the source code cannot be displayed. Click OK. 100 | 101 | Several windows will open. Right-click in the Call Stack window. Choose Load 102 | Symbols. The Find Symbols dialog will open, looking for (g)vim.pdb. Navigate 103 | to the directory where you have the PDB file and click Open. 104 | 105 | At this point, you should have a full call stack with vim function names and 106 | line numbers. Double-click one of the lines and the Find Source dialog will 107 | appear. Navigate to the directory where the Vim source is (if you have it.) 108 | 109 | If you don't know how to debug this any further, follow the instructions 110 | at ":help bug-report". Paste the call stack into the bug report. 111 | 112 | If you have a non-free version of Visual Studio, you can save a minidump via 113 | the Debug menu and send it with the bug report. A minidump is a small file 114 | (<100KB), which contains information about the state of your process. 115 | Visual C++ 2005 Express Edition cannot save minidumps and it cannot be 116 | installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you 117 | need to save minidumps or you want a just-in-time (postmortem) debugger. 118 | 119 | *debug-windbg* 120 | 3.3 Debugging Vim crashes with WinDbg ~ 121 | 122 | See |get-ms-debuggers| to obtain a copy of WinDbg. 123 | 124 | As with the Visual Studio IDE, you can attach WinDbg to a running Vim process. 125 | You can also have your system automatically invoke WinDbg as a postmortem 126 | debugger. To set WinDbg as your postmortem debugger, run "windbg -I". 127 | 128 | To attach WinDbg to a running Vim process, launch WinDbg. On the File menu, 129 | choose Attach to a Process. Select the Vim process and click OK. 130 | 131 | At this point, choose Symbol File Path on the File menu, and add the folder 132 | containing your Vim PDB to the sympath. If you have Vim source available, 133 | use Source File Path on the File menu. You can now open source files in WinDbg 134 | and set breakpoints, if you like. Reproduce your crash. WinDbg should open the 135 | source file at the point of the crash. Using the View menu, you can examine 136 | the call stack, local variables, watch windows, and so on. 137 | 138 | If WinDbg is your postmortem debugger, you do not need to attach WinDbg to 139 | your Vim process. Simply reproduce the crash and WinDbg will launch 140 | automatically. As above, set the Symbol File Path and the Source File Path. 141 | 142 | To save a minidump, type the following at the WinDbg command line: > 143 | .dump vim.dmp 144 | < 145 | *debug-minidump* 146 | 3.4 Opening a Minidump ~ 147 | 148 | If you have a minidump file, you can open it in Visual Studio or in WinDbg. 149 | 150 | In Visual Studio 2005: on the File menu, choose Open, then Project/Solution. 151 | Navigate to the .dmp file and open it. Now press F5 to invoke the debugger. 152 | Follow the instructions in |debug-vs2005| to set the Symbol File Path. 153 | 154 | In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in 155 | |debug-windbg| to set the Symbol File Path. 156 | 157 | *get-ms-debuggers* 158 | 3.5 Obtaining Microsoft Debugging Tools ~ 159 | 160 | Visual Studio 2017 Community Edition can be downloaded for free from: 161 | https://visualstudio.microsoft.com/downloads/ 162 | 163 | ========================================================================= 164 | vim:tw=78:ts=8:noet:ft=help:norl: 165 | -------------------------------------------------------------------------------- /doc/deprecated.jax: -------------------------------------------------------------------------------- 1 | *deprecated.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL 5 | 6 | 7 | Nvim *deprecated* 8 | 9 | The items listed below are "deprecated". This means they will be removed in 10 | the future. They should not be used in new scripts, and old scripts should be 11 | updated. 12 | 13 | ============================================================================== 14 | 15 | API ~ 16 | *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead. 17 | *nvim_command_output()* Use |nvim_exec()| instead. 18 | *nvim_execute_lua()* Use |nvim_exec_lua()| instead. 19 | 20 | Commands ~ 21 | *:rv* 22 | *:rviminfo* Deprecated alias to |:rshada| command. 23 | *:wv* 24 | *:wviminfo* Deprecated alias to |:wshada| command. 25 | 26 | Environment Variables ~ 27 | *$NVIM_LISTEN_ADDRESS* Deprecated in favor of |--listen|. If both are given, 28 | $NVIM_LISTEN_ADDRESS is ignored. 29 | 30 | Events ~ 31 | *EncodingChanged* Never fired; 'encoding' is always "utf-8". 32 | *FileEncoding* Never fired; equivalent to |EncodingChanged|. 33 | *GUIEnter* Never fired; use |UIEnter| instead. 34 | *GUIFailed* Never fired. 35 | 36 | Keycodes ~ 37 | ** Use instead. 38 | ** Use instead. 39 | 40 | Functions ~ 41 | *buffer_exists()* Obsolete name for |bufexists()|. 42 | *buffer_name()* Obsolete name for |bufname()|. 43 | *buffer_number()* Obsolete name for |bufnr()|. 44 | *file_readable()* Obsolete name for |filereadable()|. 45 | *highlight_exists()* Obsolete name for |hlexists()|. 46 | *highlightID()* Obsolete name for |hlID()|. 47 | *inputdialog()* Use |input()| instead. 48 | *jobclose()* Obsolete name for |chanclose()| 49 | *jobsend()* Obsolete name for |chansend()| 50 | *last_buffer_nr()* Obsolete name for bufnr("$"). 51 | *rpcstop()* Deprecated. Instead use |jobstop()| to stop any job, 52 | or chanclose(id, "rpc") to close RPC communication 53 | without stopping the job. Use chanclose(id) to close 54 | any socket. 55 | 56 | 57 | Modifiers ~ 58 | *cpo-<* 59 | *:menu-* 60 | *:menu-special* <> notation is always enabled. 61 | *:map-* 62 | *:map-special* <> notation is always enabled. 63 | 64 | Normal commands ~ 65 | *]f* 66 | *[f* Same as "gf". 67 | 68 | Options ~ 69 | *'cscopeverbose'* Enabled by default. Use |:silent| instead. 70 | *'exrc'* *'ex'* Security risk: downloaded files could include 71 | a malicious .nvimrc or .exrc file. See 'secure'. 72 | Recommended alternative: define an autocommand in your 73 | |vimrc| to set options for a matching directory. 74 | 'gd' 75 | 'gdefault' Enables the |:substitute| flag 'g' by default. 76 | *'fe'* 'fenc'+'enc' before Vim 6.0; no longer used. 77 | *'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed. 78 | *'langnoremap'* Deprecated alias to 'nolangremap'. 79 | *'vi'* 80 | *'viminfo'* Deprecated alias to 'shada' option. 81 | *'viminfofile'* Deprecated alias to 'shadafile' option. 82 | 83 | UI extensions~ 84 | *ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled 85 | by the `ext_wildmenu` |ui-option|. Emits these events: 86 | ["wildmenu_show", items] 87 | ["wildmenu_select", selected] 88 | ["wildmenu_hide"] 89 | 90 | Variables~ 91 | *b:terminal_job_pid* PID of the top-level process in a |:terminal|. 92 | Use `jobpid(&channel)` instead. 93 | 94 | vim:noet:tw=78:ts=8:ft=help:norl: 95 | -------------------------------------------------------------------------------- /doc/deprecated.txt: -------------------------------------------------------------------------------- 1 | *deprecated.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL 5 | 6 | 7 | Nvim *deprecated* 8 | 9 | The items listed below are "deprecated". This means they will be removed in 10 | the future. They should not be used in new scripts, and old scripts should be 11 | updated. 12 | 13 | ============================================================================== 14 | 15 | API ~ 16 | *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead. 17 | *nvim_command_output()* Use |nvim_exec()| instead. 18 | *nvim_execute_lua()* Use |nvim_exec_lua()| instead. 19 | 20 | Commands ~ 21 | *:rv* 22 | *:rviminfo* Deprecated alias to |:rshada| command. 23 | *:wv* 24 | *:wviminfo* Deprecated alias to |:wshada| command. 25 | 26 | Environment Variables ~ 27 | *$NVIM_LISTEN_ADDRESS* Deprecated in favor of |--listen|. If both are given, 28 | $NVIM_LISTEN_ADDRESS is ignored. 29 | 30 | Events ~ 31 | *EncodingChanged* Never fired; 'encoding' is always "utf-8". 32 | *FileEncoding* Never fired; equivalent to |EncodingChanged|. 33 | *GUIEnter* Never fired; use |UIEnter| instead. 34 | *GUIFailed* Never fired. 35 | 36 | Keycodes ~ 37 | ** Use instead. 38 | ** Use instead. 39 | 40 | Functions ~ 41 | *buffer_exists()* Obsolete name for |bufexists()|. 42 | *buffer_name()* Obsolete name for |bufname()|. 43 | *buffer_number()* Obsolete name for |bufnr()|. 44 | *file_readable()* Obsolete name for |filereadable()|. 45 | *highlight_exists()* Obsolete name for |hlexists()|. 46 | *highlightID()* Obsolete name for |hlID()|. 47 | *inputdialog()* Use |input()| instead. 48 | *jobclose()* Obsolete name for |chanclose()| 49 | *jobsend()* Obsolete name for |chansend()| 50 | *last_buffer_nr()* Obsolete name for bufnr("$"). 51 | *rpcstop()* Deprecated. Instead use |jobstop()| to stop any job, 52 | or chanclose(id, "rpc") to close RPC communication 53 | without stopping the job. Use chanclose(id) to close 54 | any socket. 55 | 56 | 57 | Modifiers ~ 58 | *cpo-<* 59 | *:menu-* 60 | *:menu-special* <> notation is always enabled. 61 | *:map-* 62 | *:map-special* <> notation is always enabled. 63 | 64 | Normal commands ~ 65 | *]f* 66 | *[f* Same as "gf". 67 | 68 | Options ~ 69 | *'cscopeverbose'* Enabled by default. Use |:silent| instead. 70 | *'exrc'* *'ex'* Security risk: downloaded files could include 71 | a malicious .nvimrc or .exrc file. See 'secure'. 72 | Recommended alternative: define an autocommand in your 73 | |vimrc| to set options for a matching directory. 74 | 'gd' 75 | 'gdefault' Enables the |:substitute| flag 'g' by default. 76 | *'fe'* 'fenc'+'enc' before Vim 6.0; no longer used. 77 | *'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed. 78 | *'langnoremap'* Deprecated alias to 'nolangremap'. 79 | *'vi'* 80 | *'viminfo'* Deprecated alias to 'shada' option. 81 | *'viminfofile'* Deprecated alias to 'shadafile' option. 82 | 83 | UI extensions~ 84 | *ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled 85 | by the `ext_wildmenu` |ui-option|. Emits these events: 86 | ["wildmenu_show", items] 87 | ["wildmenu_select", selected] 88 | ["wildmenu_hide"] 89 | 90 | Variables~ 91 | *b:terminal_job_pid* PID of the top-level process in a |:terminal|. 92 | Use `jobpid(&channel)` instead. 93 | 94 | vim:noet:tw=78:ts=8:ft=help:norl: 95 | -------------------------------------------------------------------------------- /doc/hebrew.jax: -------------------------------------------------------------------------------- 1 | *hebrew.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem) 5 | 6 | 7 | Hebrew Language support (options & mapping) for Vim *hebrew* 8 | 9 | The supporting 'rightleft' functionality was originally created by Avner 10 | Lottem. Ron Aaron is 11 | currently helping support these features. 12 | 13 | 14 | Introduction 15 | ------------ 16 | Hebrew-specific options are 'hkmap', 'hkmapp' 'keymap'=hebrew and 'aleph'. 17 | Hebrew-useful options are 'delcombine', 'allowrevins', 'revins', 'rightleft' 18 | and 'rightleftcmd'. 19 | 20 | The 'rightleft' mode reverses the display order, so characters are displayed 21 | from right to left instead of the usual left to right. This is useful 22 | primarily when editing Hebrew or other Middle-Eastern languages. 23 | See |rileft.txt| for further details. 24 | 25 | Details 26 | -------------- 27 | + Options: 28 | + 'rightleft' ('rl') sets window orientation to right-to-left. This means 29 | that the logical text 'ABC' will be displayed as 'CBA', and will start 30 | drawing at the right edge of the window, not the left edge. 31 | + 'hkmap' ('hk') sets keyboard mapping to Hebrew, in insert/replace modes. 32 | + 'aleph' ('al'), numeric, holds the decimal code of Aleph, for keyboard 33 | mapping. 34 | + 'hkmapp' ('hkp') sets keyboard mapping to 'phonetic hebrew' 35 | 36 | NOTE: these three ('hkmap', 'hkmapp' and 'aleph') are obsolete. You should 37 | use ":set keymap=hebrewp" instead. 38 | 39 | + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded Hebrew, allows 40 | one to remove the niqud or te`amim by pressing 'x' on a character (with 41 | associated niqud). 42 | 43 | + 'rightleftcmd' ('rlc') makes the command-prompt for searches show up on 44 | the right side. It only takes effect if the window is 'rightleft'. 45 | 46 | + Encoding: 47 | + Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250). 48 | + Under MS DOS, PC encoding (Hebrew letters codes: 128-154). 49 | These are defaults, that can be overridden using the 'aleph' option. 50 | + You should prefer using UTF8, as it supports the combining-characters 51 | ('deco' does nothing if UTF8 encoding is not active). 52 | 53 | + Vim arguments: 54 | + 'vim -H file' starts editing a Hebrew file, i.e. 'rightleft' and 'hkmap' 55 | are set. 56 | 57 | + Keyboard: 58 | + The 'allowrevins' option enables the CTRL-_ command in Insert mode and 59 | in Command-line mode. 60 | 61 | + CTRL-_ in insert/replace modes toggles 'revins' and 'hkmap' as follows: 62 | 63 | When in rightleft window, 'revins' and 'nohkmap' are toggled, since 64 | English will likely be inserted in this case. 65 | 66 | When in norightleft window, 'revins' 'hkmap' are toggled, since Hebrew 67 | will likely be inserted in this case. 68 | 69 | CTRL-_ moves the cursor to the end of the typed text. 70 | 71 | + CTRL-_ in command mode only toggles keyboard mapping (see Bugs below). 72 | This setting is independent of 'hkmap' option, which only applies to 73 | insert/replace mode. 74 | 75 | Note: On some keyboards, CTRL-_ is mapped to CTRL-?. 76 | 77 | + Keyboard mapping while 'hkmap' is set (standard Israeli keyboard): 78 | 79 | q w e r t y u i o p 80 | / ' ק ר א ט ו ן ם פ 81 | 82 | a s d f g h j k l ; ' 83 | ש ד ג כ ע י ח ל ך ף , 84 | 85 | z x c v b n m , . / 86 | ז ס ב ה נ מ צ ת ץ . 87 | 88 | This is also the keymap when 'keymap=hebrew' is set. The advantage of 89 | 'keymap' is that it works properly when using UTF8, e.g. it inserts the 90 | correct characters; 'hkmap' does not. The 'keymap' keyboard can also 91 | insert niqud and te`amim. To see what those mappings are, look at the 92 | keymap file 'hebrew.vim' etc. 93 | 94 | 95 | Typing backwards 96 | 97 | If the 'revins' (reverse insert) option is set, inserting happens backwards. 98 | This can be used to type Hebrew. When inserting characters the cursor is not 99 | moved and the text moves rightwards. A deletes the character under the 100 | cursor. CTRL-W and CTRL-U also work in the opposite direction. , CTRL-W 101 | and CTRL-U do not stop at the start of insert or end of line, no matter how 102 | the 'backspace' option is set. 103 | 104 | There is no reverse replace mode (yet). 105 | 106 | If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the 107 | status line when reverse Insert mode is active. 108 | 109 | When the 'allowrevins' option is set, reverse Insert mode can be also entered 110 | via CTRL-_, which has some extra functionality: First, keyboard mapping is 111 | changed according to the window orientation -- if in a left-to-right window, 112 | 'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew 113 | ('hkmap' is set); if in a right-to-left window, 'revins' is used to enter 114 | English text, so the keyboard changes to English ('hkmap' is reset). Second, 115 | when exiting 'revins' via CTRL-_, the cursor moves to the end of the typed 116 | text (if possible). 117 | 118 | 119 | Pasting when in a rightleft window 120 | ---------------------------------- 121 | When cutting text with the mouse and pasting it in a rightleft window 122 | the text will be reversed, because the characters come from the cut buffer 123 | from the left to the right, while inserted in the file from the right to 124 | the left. In order to avoid it, toggle 'revins' (by typing CTRL-? or CTRL-_) 125 | before pasting. 126 | 127 | 128 | Hebrew characters and the 'isprint' variable 129 | -------------------------------------------- 130 | Sometimes Hebrew character codes are in the non-printable range defined by 131 | the 'isprint' variable. For example in the Linux console, the Hebrew font 132 | encoding starts from 128, while the default 'isprint' variable is @,161-255. 133 | The result is that all Hebrew characters are displayed as ~x. To solve this 134 | problem, set isprint=@,128-255. 135 | 136 | 137 | vim:tw=78:ts=8:noet:ft=help:norl: 138 | -------------------------------------------------------------------------------- /doc/hebrew.txt: -------------------------------------------------------------------------------- 1 | *hebrew.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem) 5 | 6 | 7 | Hebrew Language support (options & mapping) for Vim *hebrew* 8 | 9 | The supporting 'rightleft' functionality was originally created by Avner 10 | Lottem. Ron Aaron is 11 | currently helping support these features. 12 | 13 | 14 | Introduction 15 | ------------ 16 | Hebrew-specific options are 'hkmap', 'hkmapp' 'keymap'=hebrew and 'aleph'. 17 | Hebrew-useful options are 'delcombine', 'allowrevins', 'revins', 'rightleft' 18 | and 'rightleftcmd'. 19 | 20 | The 'rightleft' mode reverses the display order, so characters are displayed 21 | from right to left instead of the usual left to right. This is useful 22 | primarily when editing Hebrew or other Middle-Eastern languages. 23 | See |rileft.txt| for further details. 24 | 25 | Details 26 | -------------- 27 | + Options: 28 | + 'rightleft' ('rl') sets window orientation to right-to-left. This means 29 | that the logical text 'ABC' will be displayed as 'CBA', and will start 30 | drawing at the right edge of the window, not the left edge. 31 | + 'hkmap' ('hk') sets keyboard mapping to Hebrew, in insert/replace modes. 32 | + 'aleph' ('al'), numeric, holds the decimal code of Aleph, for keyboard 33 | mapping. 34 | + 'hkmapp' ('hkp') sets keyboard mapping to 'phonetic hebrew' 35 | 36 | NOTE: these three ('hkmap', 'hkmapp' and 'aleph') are obsolete. You should 37 | use ":set keymap=hebrewp" instead. 38 | 39 | + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded Hebrew, allows 40 | one to remove the niqud or te`amim by pressing 'x' on a character (with 41 | associated niqud). 42 | 43 | + 'rightleftcmd' ('rlc') makes the command-prompt for searches show up on 44 | the right side. It only takes effect if the window is 'rightleft'. 45 | 46 | + Encoding: 47 | + Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250). 48 | + Under MS DOS, PC encoding (Hebrew letters codes: 128-154). 49 | These are defaults, that can be overridden using the 'aleph' option. 50 | + You should prefer using UTF8, as it supports the combining-characters 51 | ('deco' does nothing if UTF8 encoding is not active). 52 | 53 | + Vim arguments: 54 | + 'vim -H file' starts editing a Hebrew file, i.e. 'rightleft' and 'hkmap' 55 | are set. 56 | 57 | + Keyboard: 58 | + The 'allowrevins' option enables the CTRL-_ command in Insert mode and 59 | in Command-line mode. 60 | 61 | + CTRL-_ in insert/replace modes toggles 'revins' and 'hkmap' as follows: 62 | 63 | When in rightleft window, 'revins' and 'nohkmap' are toggled, since 64 | English will likely be inserted in this case. 65 | 66 | When in norightleft window, 'revins' 'hkmap' are toggled, since Hebrew 67 | will likely be inserted in this case. 68 | 69 | CTRL-_ moves the cursor to the end of the typed text. 70 | 71 | + CTRL-_ in command mode only toggles keyboard mapping (see Bugs below). 72 | This setting is independent of 'hkmap' option, which only applies to 73 | insert/replace mode. 74 | 75 | Note: On some keyboards, CTRL-_ is mapped to CTRL-?. 76 | 77 | + Keyboard mapping while 'hkmap' is set (standard Israeli keyboard): 78 | 79 | q w e r t y u i o p 80 | / ' ק ר א ט ו ן ם פ 81 | 82 | a s d f g h j k l ; ' 83 | ש ד ג כ ע י ח ל ך ף , 84 | 85 | z x c v b n m , . / 86 | ז ס ב ה נ מ צ ת ץ . 87 | 88 | This is also the keymap when 'keymap=hebrew' is set. The advantage of 89 | 'keymap' is that it works properly when using UTF8, e.g. it inserts the 90 | correct characters; 'hkmap' does not. The 'keymap' keyboard can also 91 | insert niqud and te`amim. To see what those mappings are, look at the 92 | keymap file 'hebrew.vim' etc. 93 | 94 | 95 | Typing backwards 96 | 97 | If the 'revins' (reverse insert) option is set, inserting happens backwards. 98 | This can be used to type Hebrew. When inserting characters the cursor is not 99 | moved and the text moves rightwards. A deletes the character under the 100 | cursor. CTRL-W and CTRL-U also work in the opposite direction. , CTRL-W 101 | and CTRL-U do not stop at the start of insert or end of line, no matter how 102 | the 'backspace' option is set. 103 | 104 | There is no reverse replace mode (yet). 105 | 106 | If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the 107 | status line when reverse Insert mode is active. 108 | 109 | When the 'allowrevins' option is set, reverse Insert mode can be also entered 110 | via CTRL-_, which has some extra functionality: First, keyboard mapping is 111 | changed according to the window orientation -- if in a left-to-right window, 112 | 'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew 113 | ('hkmap' is set); if in a right-to-left window, 'revins' is used to enter 114 | English text, so the keyboard changes to English ('hkmap' is reset). Second, 115 | when exiting 'revins' via CTRL-_, the cursor moves to the end of the typed 116 | text (if possible). 117 | 118 | 119 | Pasting when in a rightleft window 120 | ---------------------------------- 121 | When cutting text with the mouse and pasting it in a rightleft window 122 | the text will be reversed, because the characters come from the cut buffer 123 | from the left to the right, while inserted in the file from the right to 124 | the left. In order to avoid it, toggle 'revins' (by typing CTRL-? or CTRL-_) 125 | before pasting. 126 | 127 | 128 | Hebrew characters and the 'isprint' variable 129 | -------------------------------------------- 130 | Sometimes Hebrew character codes are in the non-printable range defined by 131 | the 'isprint' variable. For example in the Linux console, the Hebrew font 132 | encoding starts from 128, while the default 'isprint' variable is @,161-255. 133 | The result is that all Hebrew characters are displayed as ~x. To solve this 134 | problem, set isprint=@,128-255. 135 | 136 | 137 | vim:tw=78:ts=8:noet:ft=help:norl: 138 | -------------------------------------------------------------------------------- /doc/help.jax: -------------------------------------------------------------------------------- 1 | *help.txt* Nvim 2 | 3 | VIM - main help file 4 | k 5 | Move around: Use the cursor keys, or "h" to go left, h l 6 | "j" to go down, "k" to go up, "l" to go right. j 7 | Close this window: Use ":q". 8 | Get out of Vim: Use ":qa!" (careful, all changes are lost!). 9 | 10 | Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-]. 11 | With the mouse: Double-click the left mouse button on a tag, e.g. |bars|. 12 | Jump back: Type CTRL-O. Repeat to go further back. 13 | 14 | Get specific help: It is possible to go directly to whatever you want help 15 | on, by giving an argument to the |:help| command. 16 | Prepend something to specify the context: *help-context* 17 | 18 | WHAT PREPEND EXAMPLE ~ 19 | Normal mode command :help x 20 | Visual mode command v_ :help v_u 21 | Insert mode command i_ :help i_ 22 | Command-line command : :help :quit 23 | Command-line editing c_ :help c_ 24 | Vim command argument - :help -r 25 | Option ' :help 'textwidth' 26 | Regular expression / :help /[ 27 | See |help-summary| for more contexts and an explanation. 28 | 29 | Search for help: Type ":help word", then hit CTRL-D to see matching 30 | help entries for "word". 31 | Or use ":helpgrep word". |:helpgrep| 32 | 33 | Getting started: Do the Vim tutor, a 20 minute interactive training for the 34 | basic commands, see |vimtutor|. 35 | Read the user manual from start to end: |usr_01.txt| 36 | 37 | Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only 38 | through the help of many others. See |credits|. 39 | ------------------------------------------------------------------------------ 40 | *doc-file-list* *Q_ct* 41 | BASIC: 42 | |quickref| Overview of the most common commands you will use 43 | |tutor| 20 minutes training course for beginners 44 | |copying| About copyrights 45 | |iccf| Helping poor children in Uganda 46 | |sponsor| Sponsor Vim development, become a registered Vim user 47 | |www| Vim on the World Wide Web 48 | |bugs| Where to send bug reports 49 | 50 | USER MANUAL: These files explain how to accomplish an editing task. 51 | 52 | |usr_toc.txt| Table Of Contents 53 | 54 | Getting Started ~ 55 | |usr_01.txt| About the manuals 56 | |usr_02.txt| The first steps in Vim 57 | |usr_03.txt| Moving around 58 | |usr_04.txt| Making small changes 59 | |usr_05.txt| Set your settings 60 | |usr_06.txt| Using syntax highlighting 61 | |usr_07.txt| Editing more than one file 62 | |usr_08.txt| Splitting windows 63 | |usr_09.txt| Using the GUI 64 | |usr_10.txt| Making big changes 65 | |usr_11.txt| Recovering from a crash 66 | |usr_12.txt| Clever tricks 67 | 68 | Editing Effectively ~ 69 | |usr_20.txt| Typing command-line commands quickly 70 | |usr_21.txt| Go away and come back 71 | |usr_22.txt| Finding the file to edit 72 | |usr_23.txt| Editing other files 73 | |usr_24.txt| Inserting quickly 74 | |usr_25.txt| Editing formatted text 75 | |usr_26.txt| Repeating 76 | |usr_27.txt| Search commands and patterns 77 | |usr_28.txt| Folding 78 | |usr_29.txt| Moving through programs 79 | |usr_30.txt| Editing programs 80 | |usr_31.txt| Exploiting the GUI 81 | |usr_32.txt| The undo tree 82 | 83 | Tuning Vim ~ 84 | |usr_40.txt| Make new commands 85 | |usr_41.txt| Write a Vim script 86 | |usr_42.txt| Add new menus 87 | |usr_43.txt| Using filetypes 88 | |usr_44.txt| Your own syntax highlighted 89 | |usr_45.txt| Select your language 90 | 91 | 92 | REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc* 93 | 94 | General subjects ~ 95 | |intro.txt| general introduction to Vim; notation used in help files 96 | |help.txt| overview and quick reference (this file) 97 | |helphelp.txt| about using the help files 98 | |index.txt| alphabetical index of all commands 99 | |help-tags| all the tags you can jump to (index of tags) 100 | |tips.txt| various tips on using Vim 101 | |message.txt| (error) messages and explanations 102 | |develop.txt| development of Nvim 103 | |debug.txt| debugging Vim itself 104 | |uganda.txt| Vim distribution conditions and what to do with your money 105 | 106 | Basic editing ~ 107 | |starting.txt| starting Vim, Vim command arguments, initialisation 108 | |editing.txt| editing and writing files 109 | |motion.txt| commands for moving around 110 | |scroll.txt| scrolling the text in the window 111 | |insert.txt| Insert and Replace mode 112 | |change.txt| deleting and replacing text 113 | |undo.txt| Undo and Redo 114 | |repeat.txt| repeating commands, Vim scripts and debugging 115 | |visual.txt| using the Visual mode (selecting a text area) 116 | |various.txt| various remaining commands 117 | |recover.txt| recovering from a crash 118 | 119 | Advanced editing ~ 120 | |cmdline.txt| Command-line editing 121 | |options.txt| description of all options 122 | |pattern.txt| regexp patterns and search commands 123 | |map.txt| key mapping and abbreviations 124 | |tagsrch.txt| tags and special searches 125 | |windows.txt| commands for using multiple windows and buffers 126 | |tabpage.txt| commands for using multiple tab pages 127 | |spell.txt| spell checking 128 | |diff.txt| working with two to four versions of the same file 129 | |autocmd.txt| automatically executing commands on an event 130 | |eval.txt| expression evaluation, conditional commands 131 | |fold.txt| hide (fold) ranges of lines 132 | |lua.txt| Lua API 133 | 134 | Special issues ~ 135 | |print.txt| printing 136 | |remote.txt| using Vim as a server or client 137 | 138 | Programming language support ~ 139 | |indent.txt| automatic indenting for C and other languages 140 | |syntax.txt| syntax highlighting 141 | |filetype.txt| settings done specifically for a type of file 142 | |quickfix.txt| commands for a quick edit-compile-fix cycle 143 | |ft_ada.txt| Ada (the programming language) support 144 | |ft_rust.txt| Filetype plugin for Rust 145 | |ft_sql.txt| about the SQL filetype plugin 146 | 147 | Language support ~ 148 | |digraph.txt| list of available digraphs 149 | |mbyte.txt| multi-byte text support 150 | |mlang.txt| non-English language support 151 | |rileft.txt| right-to-left editing mode 152 | |arabic.txt| Arabic language support and editing 153 | |hebrew.txt| Hebrew language support and editing 154 | |russian.txt| Russian language support and editing 155 | 156 | GUI ~ 157 | |gui.txt| Graphical User Interface (GUI) 158 | 159 | Interfaces ~ 160 | |if_cscop.txt| using Cscope with Vim 161 | |if_pyth.txt| Python interface 162 | |if_ruby.txt| Ruby interface 163 | |sign.txt| debugging signs 164 | 165 | Versions ~ 166 | |vim_diff.txt| Main differences between Nvim and Vim 167 | |vi_diff.txt| Main differences between Vim and Vi 168 | *standard-plugin-list* 169 | Standard plugins ~ 170 | |pi_gzip.txt| Reading and writing compressed files 171 | |pi_health.txt| Healthcheck framework 172 | |pi_matchit.txt| Extended "%" matching 173 | |pi_msgpack.txt| msgpack utilities 174 | |pi_netrw.txt| Reading and writing files over a network 175 | |pi_paren.txt| Highlight matching parens 176 | |pi_spec.txt| Filetype plugin to work with rpm spec files 177 | |pi_tar.txt| Tar file explorer 178 | |pi_zip.txt| Zip archive explorer 179 | 180 | LOCAL ADDITIONS: *local-additions* 181 | 182 | ------------------------------------------------------------------------------ 183 | *bars* Bars example 184 | 185 | Now that you've jumped here with CTRL-] or a double mouse click, you can use 186 | CTRL-T, CTRL-O, g, or to go back to where you were. 187 | 188 | Note that tags are within | characters, but when highlighting is enabled these 189 | characters are hidden. That makes it easier to read a command. 190 | 191 | Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim 192 | will try to find help for it. Especially for options in single quotes, e.g. 193 | 'hlsearch'. 194 | 195 | ------------------------------------------------------------------------------ 196 | vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: 197 | -------------------------------------------------------------------------------- /doc/help.txt: -------------------------------------------------------------------------------- 1 | *help.txt* Nvim 2 | 3 | VIM - main help file 4 | k 5 | Move around: Use the cursor keys, or "h" to go left, h l 6 | "j" to go down, "k" to go up, "l" to go right. j 7 | Close this window: Use ":q". 8 | Get out of Vim: Use ":qa!" (careful, all changes are lost!). 9 | 10 | Jump to a subject: Position the cursor on a tag (e.g. |bars|) and hit CTRL-]. 11 | With the mouse: Double-click the left mouse button on a tag, e.g. |bars|. 12 | Jump back: Type CTRL-O. Repeat to go further back. 13 | 14 | Get specific help: It is possible to go directly to whatever you want help 15 | on, by giving an argument to the |:help| command. 16 | Prepend something to specify the context: *help-context* 17 | 18 | WHAT PREPEND EXAMPLE ~ 19 | Normal mode command :help x 20 | Visual mode command v_ :help v_u 21 | Insert mode command i_ :help i_ 22 | Command-line command : :help :quit 23 | Command-line editing c_ :help c_ 24 | Vim command argument - :help -r 25 | Option ' :help 'textwidth' 26 | Regular expression / :help /[ 27 | See |help-summary| for more contexts and an explanation. 28 | 29 | Search for help: Type ":help word", then hit CTRL-D to see matching 30 | help entries for "word". 31 | Or use ":helpgrep word". |:helpgrep| 32 | 33 | Getting started: Do the Vim tutor, a 20 minute interactive training for the 34 | basic commands, see |vimtutor|. 35 | Read the user manual from start to end: |usr_01.txt| 36 | 37 | Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only 38 | through the help of many others. See |credits|. 39 | ------------------------------------------------------------------------------ 40 | *doc-file-list* *Q_ct* 41 | BASIC: 42 | |quickref| Overview of the most common commands you will use 43 | |tutor| 20 minutes training course for beginners 44 | |copying| About copyrights 45 | |iccf| Helping poor children in Uganda 46 | |sponsor| Sponsor Vim development, become a registered Vim user 47 | |www| Vim on the World Wide Web 48 | |bugs| Where to send bug reports 49 | 50 | USER MANUAL: These files explain how to accomplish an editing task. 51 | 52 | |usr_toc.txt| Table Of Contents 53 | 54 | Getting Started ~ 55 | |usr_01.txt| About the manuals 56 | |usr_02.txt| The first steps in Vim 57 | |usr_03.txt| Moving around 58 | |usr_04.txt| Making small changes 59 | |usr_05.txt| Set your settings 60 | |usr_06.txt| Using syntax highlighting 61 | |usr_07.txt| Editing more than one file 62 | |usr_08.txt| Splitting windows 63 | |usr_09.txt| Using the GUI 64 | |usr_10.txt| Making big changes 65 | |usr_11.txt| Recovering from a crash 66 | |usr_12.txt| Clever tricks 67 | 68 | Editing Effectively ~ 69 | |usr_20.txt| Typing command-line commands quickly 70 | |usr_21.txt| Go away and come back 71 | |usr_22.txt| Finding the file to edit 72 | |usr_23.txt| Editing other files 73 | |usr_24.txt| Inserting quickly 74 | |usr_25.txt| Editing formatted text 75 | |usr_26.txt| Repeating 76 | |usr_27.txt| Search commands and patterns 77 | |usr_28.txt| Folding 78 | |usr_29.txt| Moving through programs 79 | |usr_30.txt| Editing programs 80 | |usr_31.txt| Exploiting the GUI 81 | |usr_32.txt| The undo tree 82 | 83 | Tuning Vim ~ 84 | |usr_40.txt| Make new commands 85 | |usr_41.txt| Write a Vim script 86 | |usr_42.txt| Add new menus 87 | |usr_43.txt| Using filetypes 88 | |usr_44.txt| Your own syntax highlighted 89 | |usr_45.txt| Select your language 90 | 91 | 92 | REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc* 93 | 94 | General subjects ~ 95 | |intro.txt| general introduction to Vim; notation used in help files 96 | |help.txt| overview and quick reference (this file) 97 | |helphelp.txt| about using the help files 98 | |index.txt| alphabetical index of all commands 99 | |help-tags| all the tags you can jump to (index of tags) 100 | |tips.txt| various tips on using Vim 101 | |message.txt| (error) messages and explanations 102 | |develop.txt| development of Nvim 103 | |debug.txt| debugging Vim itself 104 | |uganda.txt| Vim distribution conditions and what to do with your money 105 | 106 | Basic editing ~ 107 | |starting.txt| starting Vim, Vim command arguments, initialisation 108 | |editing.txt| editing and writing files 109 | |motion.txt| commands for moving around 110 | |scroll.txt| scrolling the text in the window 111 | |insert.txt| Insert and Replace mode 112 | |change.txt| deleting and replacing text 113 | |undo.txt| Undo and Redo 114 | |repeat.txt| repeating commands, Vim scripts and debugging 115 | |visual.txt| using the Visual mode (selecting a text area) 116 | |various.txt| various remaining commands 117 | |recover.txt| recovering from a crash 118 | 119 | Advanced editing ~ 120 | |cmdline.txt| Command-line editing 121 | |options.txt| description of all options 122 | |pattern.txt| regexp patterns and search commands 123 | |map.txt| key mapping and abbreviations 124 | |tagsrch.txt| tags and special searches 125 | |windows.txt| commands for using multiple windows and buffers 126 | |tabpage.txt| commands for using multiple tab pages 127 | |spell.txt| spell checking 128 | |diff.txt| working with two to four versions of the same file 129 | |autocmd.txt| automatically executing commands on an event 130 | |eval.txt| expression evaluation, conditional commands 131 | |fold.txt| hide (fold) ranges of lines 132 | |lua.txt| Lua API 133 | 134 | Special issues ~ 135 | |print.txt| printing 136 | |remote.txt| using Vim as a server or client 137 | 138 | Programming language support ~ 139 | |indent.txt| automatic indenting for C and other languages 140 | |syntax.txt| syntax highlighting 141 | |filetype.txt| settings done specifically for a type of file 142 | |quickfix.txt| commands for a quick edit-compile-fix cycle 143 | |ft_ada.txt| Ada (the programming language) support 144 | |ft_rust.txt| Filetype plugin for Rust 145 | |ft_sql.txt| about the SQL filetype plugin 146 | 147 | Language support ~ 148 | |digraph.txt| list of available digraphs 149 | |mbyte.txt| multi-byte text support 150 | |mlang.txt| non-English language support 151 | |rileft.txt| right-to-left editing mode 152 | |arabic.txt| Arabic language support and editing 153 | |hebrew.txt| Hebrew language support and editing 154 | |russian.txt| Russian language support and editing 155 | 156 | GUI ~ 157 | |gui.txt| Graphical User Interface (GUI) 158 | 159 | Interfaces ~ 160 | |if_cscop.txt| using Cscope with Vim 161 | |if_pyth.txt| Python interface 162 | |if_ruby.txt| Ruby interface 163 | |sign.txt| debugging signs 164 | 165 | Versions ~ 166 | |vim_diff.txt| Main differences between Nvim and Vim 167 | |vi_diff.txt| Main differences between Vim and Vi 168 | *standard-plugin-list* 169 | Standard plugins ~ 170 | |pi_gzip.txt| Reading and writing compressed files 171 | |pi_health.txt| Healthcheck framework 172 | |pi_matchit.txt| Extended "%" matching 173 | |pi_msgpack.txt| msgpack utilities 174 | |pi_netrw.txt| Reading and writing files over a network 175 | |pi_paren.txt| Highlight matching parens 176 | |pi_spec.txt| Filetype plugin to work with rpm spec files 177 | |pi_tar.txt| Tar file explorer 178 | |pi_zip.txt| Zip archive explorer 179 | 180 | LOCAL ADDITIONS: *local-additions* 181 | 182 | ------------------------------------------------------------------------------ 183 | *bars* Bars example 184 | 185 | Now that you've jumped here with CTRL-] or a double mouse click, you can use 186 | CTRL-T, CTRL-O, g, or to go back to where you were. 187 | 188 | Note that tags are within | characters, but when highlighting is enabled these 189 | characters are hidden. That makes it easier to read a command. 190 | 191 | Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim 192 | will try to find help for it. Especially for options in single quotes, e.g. 193 | 'hlsearch'. 194 | 195 | ------------------------------------------------------------------------------ 196 | vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: 197 | -------------------------------------------------------------------------------- /doc/if_lua.jax: -------------------------------------------------------------------------------- 1 | 2 | 3 | NVIM REFERENCE MANUAL 4 | 5 | Moved to |lua.txt| 6 | 7 | ============================================================================== 8 | vim:tw=78:ts=8:noet:ft=help:norl: 9 | -------------------------------------------------------------------------------- /doc/if_lua.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | NVIM REFERENCE MANUAL 4 | 5 | Moved to |lua.txt| 6 | 7 | ============================================================================== 8 | vim:tw=78:ts=8:noet:ft=help:norl: 9 | -------------------------------------------------------------------------------- /doc/if_ruby.jax: -------------------------------------------------------------------------------- 1 | *if_ruby.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Shugo Maeda 5 | 6 | The Ruby Interface to Vim *if_ruby* *ruby* *Ruby* 7 | 8 | *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273* 9 | 10 | The home page for ruby is http://www.ruby-lang.org/. You can find links for 11 | downloading Ruby there. 12 | 13 | Type |gO| to see the table of contents. 14 | 15 | ============================================================================== 16 | 1. Commands *ruby-commands* 17 | 18 | *:ruby* *:rub* 19 | :rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: > 20 | :ruby print "Hello" 21 | 22 | :rub[y] << [endpattern] 23 | {script} 24 | {endpattern} 25 | Execute Ruby script {script}. 26 | The {endpattern} after {script} must NOT be preceded 27 | by any white space. 28 | 29 | If [endpattern] is omitted, it defaults to a dot '.' 30 | like for the |:append| and |:insert| commands. 31 | 32 | This form of the |:ruby| command is mainly useful for 33 | including ruby code in vim scripts. 34 | 35 | Note: This command doesn't work when the Ruby feature 36 | wasn't compiled in. To avoid errors, see 37 | |script-here|. 38 | 39 | Example Vim script: > 40 | 41 | function! RedGem() 42 | ruby << EOF 43 | class Garnet 44 | def initialize(s) 45 | @buffer = VIM::Buffer.current 46 | vimputs(s) 47 | end 48 | def vimputs(s) 49 | @buffer.append(@buffer.count,s) 50 | end 51 | end 52 | gem = Garnet.new("pretty") 53 | EOF 54 | endfunction 55 | < 56 | To see what version of Ruby you have: > 57 | :ruby print RUBY_VERSION 58 | < 59 | 60 | *:rubydo* *:rubyd* *E265* 61 | :[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the 62 | [range], with $_ being set to the text of each line in 63 | turn, without a trailing . Setting $_ will change 64 | the text, but note that it is not possible to add or 65 | delete lines using this command. 66 | The default for [range] is the whole file: "1,$". 67 | 68 | *:rubyfile* *:rubyf* 69 | :rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as 70 | `:ruby load 'file'`, but allows file name completion. 71 | 72 | Executing Ruby commands is not possible in the |sandbox|. 73 | 74 | ============================================================================== 75 | 2. The VIM module *ruby-vim* 76 | 77 | Ruby code gets all of its access to vim via the "VIM" module. 78 | 79 | Overview > 80 | print "Hello" # displays a message 81 | VIM.command(cmd) # execute an Ex command 82 | num = VIM::Window.count # gets the number of windows 83 | w = VIM::Window[n] # gets window "n" 84 | cw = VIM::Window.current # gets the current window 85 | num = VIM::Buffer.count # gets the number of buffers 86 | b = VIM::Buffer[n] # gets buffer "n" 87 | cb = VIM::Buffer.current # gets the current buffer 88 | w.height = lines # sets the window height 89 | w.cursor = [row, col] # sets the window cursor position 90 | pos = w.cursor # gets an array [row, col] 91 | name = b.name # gets the buffer file name 92 | line = b[n] # gets a line from the buffer 93 | num = b.count # gets the number of lines 94 | b[n] = str # sets a line in the buffer 95 | b.delete(n) # deletes a line 96 | b.append(n, str) # appends a line after n 97 | line = VIM::Buffer.current.line # gets the current line 98 | num = VIM::Buffer.current.line_number # gets the current line number 99 | VIM::Buffer.current.line = "test" # sets the current line number 100 | < 101 | 102 | Module Functions: 103 | 104 | *ruby-message* 105 | VIM::message({msg}) 106 | Displays the message {msg}. 107 | 108 | *ruby-set_option* 109 | VIM::set_option({arg}) 110 | Sets a vim option. {arg} can be any argument that the ":set" command 111 | accepts. Note that this means that no spaces are allowed in the 112 | argument! See |:set|. 113 | 114 | *ruby-command* 115 | VIM::command({cmd}) 116 | Executes Ex command {cmd}. 117 | 118 | *ruby-evaluate* 119 | VIM::evaluate({expr}) 120 | Evaluates {expr} using the vim internal expression evaluator (see 121 | |expression|). Returns the expression result as a string. 122 | A |List| is turned into a string by joining the items and inserting 123 | line breaks. 124 | 125 | ============================================================================== 126 | 3. VIM::Buffer objects *ruby-buffer* 127 | 128 | VIM::Buffer objects represent vim buffers. 129 | 130 | Class Methods: 131 | 132 | current Returns the current buffer object. 133 | count Returns the number of buffers. 134 | self[{n}] Returns the buffer object for the number {n}. The first number 135 | is 0. 136 | 137 | Methods: 138 | 139 | name Returns the name of the buffer. 140 | number Returns the number of the buffer. 141 | count Returns the number of lines. 142 | length Returns the number of lines. 143 | self[{n}] Returns a line from the buffer. {n} is the line number. 144 | self[{n}] = {str} 145 | Sets a line in the buffer. {n} is the line number. 146 | delete({n}) Deletes a line from the buffer. {n} is the line number. 147 | append({n}, {str}) 148 | Appends a line after the line {n}. 149 | line Returns the current line of the buffer if the buffer is 150 | active. 151 | line = {str} Sets the current line of the buffer if the buffer is active. 152 | line_number Returns the number of the current line if the buffer is 153 | active. 154 | 155 | ============================================================================== 156 | 4. VIM::Window objects *ruby-window* 157 | 158 | VIM::Window objects represent vim windows. 159 | 160 | Class Methods: 161 | 162 | current Returns the current window object. 163 | count Returns the number of windows. 164 | self[{n}] Returns the window object for the number {n}. The first number 165 | is 0. 166 | 167 | Methods: 168 | 169 | buffer Returns the buffer displayed in the window. 170 | height Returns the height of the window. 171 | height = {n} Sets the window height to {n}. 172 | width Returns the width of the window. 173 | width = {n} Sets the window width to {n}. 174 | cursor Returns a [row, col] array for the cursor position. 175 | cursor = [{row}, {col}] 176 | Sets the cursor position to {row} and {col}. 177 | 178 | ============================================================================== 179 | 5. Global variables *ruby-globals* 180 | 181 | There are two global variables. 182 | 183 | $curwin The current window object. 184 | $curbuf The current buffer object. 185 | 186 | ============================================================================== 187 | vim:tw=78:ts=8:noet:ft=help:norl: 188 | -------------------------------------------------------------------------------- /doc/if_ruby.txt: -------------------------------------------------------------------------------- 1 | *if_ruby.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Shugo Maeda 5 | 6 | The Ruby Interface to Vim *if_ruby* *ruby* *Ruby* 7 | 8 | *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273* 9 | 10 | The home page for ruby is http://www.ruby-lang.org/. You can find links for 11 | downloading Ruby there. 12 | 13 | Type |gO| to see the table of contents. 14 | 15 | ============================================================================== 16 | 1. Commands *ruby-commands* 17 | 18 | *:ruby* *:rub* 19 | :rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: > 20 | :ruby print "Hello" 21 | 22 | :rub[y] << [endpattern] 23 | {script} 24 | {endpattern} 25 | Execute Ruby script {script}. 26 | The {endpattern} after {script} must NOT be preceded 27 | by any white space. 28 | 29 | If [endpattern] is omitted, it defaults to a dot '.' 30 | like for the |:append| and |:insert| commands. 31 | 32 | This form of the |:ruby| command is mainly useful for 33 | including ruby code in vim scripts. 34 | 35 | Note: This command doesn't work when the Ruby feature 36 | wasn't compiled in. To avoid errors, see 37 | |script-here|. 38 | 39 | Example Vim script: > 40 | 41 | function! RedGem() 42 | ruby << EOF 43 | class Garnet 44 | def initialize(s) 45 | @buffer = VIM::Buffer.current 46 | vimputs(s) 47 | end 48 | def vimputs(s) 49 | @buffer.append(@buffer.count,s) 50 | end 51 | end 52 | gem = Garnet.new("pretty") 53 | EOF 54 | endfunction 55 | < 56 | To see what version of Ruby you have: > 57 | :ruby print RUBY_VERSION 58 | < 59 | 60 | *:rubydo* *:rubyd* *E265* 61 | :[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the 62 | [range], with $_ being set to the text of each line in 63 | turn, without a trailing . Setting $_ will change 64 | the text, but note that it is not possible to add or 65 | delete lines using this command. 66 | The default for [range] is the whole file: "1,$". 67 | 68 | *:rubyfile* *:rubyf* 69 | :rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as 70 | `:ruby load 'file'`, but allows file name completion. 71 | 72 | Executing Ruby commands is not possible in the |sandbox|. 73 | 74 | ============================================================================== 75 | 2. The VIM module *ruby-vim* 76 | 77 | Ruby code gets all of its access to vim via the "VIM" module. 78 | 79 | Overview > 80 | print "Hello" # displays a message 81 | VIM.command(cmd) # execute an Ex command 82 | num = VIM::Window.count # gets the number of windows 83 | w = VIM::Window[n] # gets window "n" 84 | cw = VIM::Window.current # gets the current window 85 | num = VIM::Buffer.count # gets the number of buffers 86 | b = VIM::Buffer[n] # gets buffer "n" 87 | cb = VIM::Buffer.current # gets the current buffer 88 | w.height = lines # sets the window height 89 | w.cursor = [row, col] # sets the window cursor position 90 | pos = w.cursor # gets an array [row, col] 91 | name = b.name # gets the buffer file name 92 | line = b[n] # gets a line from the buffer 93 | num = b.count # gets the number of lines 94 | b[n] = str # sets a line in the buffer 95 | b.delete(n) # deletes a line 96 | b.append(n, str) # appends a line after n 97 | line = VIM::Buffer.current.line # gets the current line 98 | num = VIM::Buffer.current.line_number # gets the current line number 99 | VIM::Buffer.current.line = "test" # sets the current line number 100 | < 101 | 102 | Module Functions: 103 | 104 | *ruby-message* 105 | VIM::message({msg}) 106 | Displays the message {msg}. 107 | 108 | *ruby-set_option* 109 | VIM::set_option({arg}) 110 | Sets a vim option. {arg} can be any argument that the ":set" command 111 | accepts. Note that this means that no spaces are allowed in the 112 | argument! See |:set|. 113 | 114 | *ruby-command* 115 | VIM::command({cmd}) 116 | Executes Ex command {cmd}. 117 | 118 | *ruby-evaluate* 119 | VIM::evaluate({expr}) 120 | Evaluates {expr} using the vim internal expression evaluator (see 121 | |expression|). Returns the expression result as a string. 122 | A |List| is turned into a string by joining the items and inserting 123 | line breaks. 124 | 125 | ============================================================================== 126 | 3. VIM::Buffer objects *ruby-buffer* 127 | 128 | VIM::Buffer objects represent vim buffers. 129 | 130 | Class Methods: 131 | 132 | current Returns the current buffer object. 133 | count Returns the number of buffers. 134 | self[{n}] Returns the buffer object for the number {n}. The first number 135 | is 0. 136 | 137 | Methods: 138 | 139 | name Returns the name of the buffer. 140 | number Returns the number of the buffer. 141 | count Returns the number of lines. 142 | length Returns the number of lines. 143 | self[{n}] Returns a line from the buffer. {n} is the line number. 144 | self[{n}] = {str} 145 | Sets a line in the buffer. {n} is the line number. 146 | delete({n}) Deletes a line from the buffer. {n} is the line number. 147 | append({n}, {str}) 148 | Appends a line after the line {n}. 149 | line Returns the current line of the buffer if the buffer is 150 | active. 151 | line = {str} Sets the current line of the buffer if the buffer is active. 152 | line_number Returns the number of the current line if the buffer is 153 | active. 154 | 155 | ============================================================================== 156 | 4. VIM::Window objects *ruby-window* 157 | 158 | VIM::Window objects represent vim windows. 159 | 160 | Class Methods: 161 | 162 | current Returns the current window object. 163 | count Returns the number of windows. 164 | self[{n}] Returns the window object for the number {n}. The first number 165 | is 0. 166 | 167 | Methods: 168 | 169 | buffer Returns the buffer displayed in the window. 170 | height Returns the height of the window. 171 | height = {n} Sets the window height to {n}. 172 | width Returns the width of the window. 173 | width = {n} Sets the window width to {n}. 174 | cursor Returns a [row, col] array for the cursor position. 175 | cursor = [{row}, {col}] 176 | Sets the cursor position to {row} and {col}. 177 | 178 | ============================================================================== 179 | 5. Global variables *ruby-globals* 180 | 181 | There are two global variables. 182 | 183 | $curwin The current window object. 184 | $curbuf The current buffer object. 185 | 186 | ============================================================================== 187 | vim:tw=78:ts=8:noet:ft=help:norl: 188 | -------------------------------------------------------------------------------- /doc/job_control.jax: -------------------------------------------------------------------------------- 1 | *job_control.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim job control *job* *job-control* 8 | 9 | Job control is a way to perform multitasking in Nvim, so scripts can spawn and 10 | control multiple processes without blocking the current Nvim instance. 11 | 12 | Type |gO| to see the table of contents. 13 | 14 | ============================================================================== 15 | Concepts 16 | 17 | Job Id *job-id* 18 | 19 | Each job is identified by an integer id, unique for the life of the current 20 | Nvim session. Each job-id is a valid |channel-id|: they share the same "key 21 | space". Functions like |jobstart()| return job ids; functions like 22 | |jobsend()|, |jobstop()|, |rpcnotify()|, and |rpcrequest()| take job ids. 23 | 24 | Job stdio streams form a |channel| which can send and receive raw bytes or 25 | |msgpack-rpc| messages. 26 | 27 | ============================================================================== 28 | Usage *job-control-usage* 29 | 30 | To control jobs, use the "job…" family of functions: |jobstart()|, 31 | |jobsend()|, |jobstop()|. 32 | 33 | Example: > 34 | 35 | function! s:OnEvent(job_id, data, event) dict 36 | if a:event == 'stdout' 37 | let str = self.shell.' stdout: '.join(a:data) 38 | elseif a:event == 'stderr' 39 | let str = self.shell.' stderr: '.join(a:data) 40 | else 41 | let str = self.shell.' exited' 42 | endif 43 | 44 | call append(line('$'), str) 45 | endfunction 46 | let s:callbacks = { 47 | \ 'on_stdout': function('s:OnEvent'), 48 | \ 'on_stderr': function('s:OnEvent'), 49 | \ 'on_exit': function('s:OnEvent') 50 | \ } 51 | let job1 = jobstart(['bash'], extend({'shell': 'shell 1'}, s:callbacks)) 52 | let job2 = jobstart(['bash', '-c', 'for i in {1..10}; do echo hello $i!; sleep 1; done'], extend({'shell': 'shell 2'}, s:callbacks)) 53 | 54 | To test the above script, copy it to a file ~/foo.vim and run it: > 55 | nvim -u ~/foo.vim 56 | < 57 | Description of what happens: 58 | - Two bash shells are spawned by |jobstart()| with their stdin/stdout/stderr 59 | streams connected to nvim. 60 | - The first shell is idle, waiting to read commands from its stdin. 61 | - The second shell is started with -c which executes the command (a for-loop 62 | printing 0 through 9) and then exits. 63 | - `OnEvent()` callback is passed to |jobstart()| to handle various job 64 | events. It displays stdout/stderr data received from the shells. 65 | 66 | For |on_stdout| and |on_stderr| see |channel-callback|. 67 | *on_exit* 68 | Arguments passed to on_exit callback: 69 | 0: |job-id| 70 | 1: Exit-code of the process, or 128+SIGNUM if by signal (e.g. 143 on SIGTERM). 71 | 2: Event type: "exit" 72 | 73 | 74 | Note: Buffered stdout/stderr data which has not been flushed by the sender 75 | will not trigger the on_stdout/on_stderr callback (but if the process 76 | ends, the on_exit callback will be invoked). 77 | For example, "ruby -e" buffers output, so small strings will be 78 | buffered unless "auto-flushing" ($stdout.sync=true) is enabled. > 79 | function! Receive(job_id, data, event) 80 | echom printf('%s: %s',a:event,string(a:data)) 81 | endfunction 82 | call jobstart(['ruby', '-e', 83 | \ '$stdout.sync = true; 5.times do sleep 1 and puts "Hello Ruby!" end'], 84 | \ {'on_stdout': 'Receive'}) 85 | < https://github.com/neovim/neovim/issues/1592 86 | 87 | Note 2: 88 | Job event handlers may receive partial (incomplete) lines. For a given 89 | invocation of on_stdout/on_stderr, `a:data` is not guaranteed to end 90 | with a newline. 91 | - `abcdefg` may arrive as `['abc']`, `['defg']`. 92 | - `abc\nefg` may arrive as `['abc', '']`, `['efg']` or `['abc']`, 93 | `['','efg']`, or even `['ab']`, `['c','efg']`. 94 | Easy way to deal with this: initialize a list as `['']`, then append 95 | to it as follows: > 96 | let s:chunks = [''] 97 | func! s:on_stdout(job_id, data, event) dict 98 | let s:chunks[-1] .= a:data[0] 99 | call extend(s:chunks, a:data[1:]) 100 | endf 101 | < 102 | 103 | The |jobstart-options| dictionary is passed as |self| to the callback. 104 | The above example could be written in this "object-oriented" style: > 105 | 106 | let Shell = {} 107 | 108 | function Shell.on_stdout(_job_id, data, event) 109 | call append(line('$'), 110 | \ printf('[%s] %s: %s', a:event, self.name, join(a:data[:-2]))) 111 | endfunction 112 | 113 | let Shell.on_stderr = function(Shell.on_stdout) 114 | 115 | function Shell.on_exit(job_id, _data, event) 116 | let msg = printf('job %d ("%s") finished', a:job_id, self.name) 117 | call append(line('$'), printf('[%s] BOOM!', a:event)) 118 | call append(line('$'), printf('[%s] %s!', a:event, msg)) 119 | endfunction 120 | 121 | function Shell.new(name, cmd) 122 | let object = extend(copy(g:Shell), {'name': a:name}) 123 | let object.cmd = ['sh', '-c', a:cmd] 124 | let object.id = jobstart(object.cmd, object) 125 | $ 126 | return object 127 | endfunction 128 | 129 | let instance = Shell.new('bomb', 130 | \ 'for i in $(seq 9 -1 1); do echo $i 1>&$((i % 2 + 1)); sleep 1; done') 131 | < 132 | To send data to the job's stdin, use |chansend()|: > 133 | :call chansend(job1, "ls\n") 134 | :call chansend(job1, "invalid-command\n") 135 | :call chansend(job1, "exit\n") 136 | < 137 | A job may be killed with |jobstop()|: > 138 | :call jobstop(job1) 139 | < 140 | A job may be killed at any time with the |jobstop()| function: 141 | > 142 | :call jobstop(job1) 143 | < 144 | Individual streams can be closed without killing the job, see |chanclose()|. 145 | 146 | ============================================================================== 147 | vim:tw=78:ts=8:noet:ft=help:norl: 148 | -------------------------------------------------------------------------------- /doc/job_control.txt: -------------------------------------------------------------------------------- 1 | *job_control.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim job control *job* *job-control* 8 | 9 | Job control is a way to perform multitasking in Nvim, so scripts can spawn and 10 | control multiple processes without blocking the current Nvim instance. 11 | 12 | Type |gO| to see the table of contents. 13 | 14 | ============================================================================== 15 | Concepts 16 | 17 | Job Id *job-id* 18 | 19 | Each job is identified by an integer id, unique for the life of the current 20 | Nvim session. Each job-id is a valid |channel-id|: they share the same "key 21 | space". Functions like |jobstart()| return job ids; functions like 22 | |jobsend()|, |jobstop()|, |rpcnotify()|, and |rpcrequest()| take job ids. 23 | 24 | Job stdio streams form a |channel| which can send and receive raw bytes or 25 | |msgpack-rpc| messages. 26 | 27 | ============================================================================== 28 | Usage *job-control-usage* 29 | 30 | To control jobs, use the "job…" family of functions: |jobstart()|, 31 | |jobsend()|, |jobstop()|. 32 | 33 | Example: > 34 | 35 | function! s:OnEvent(job_id, data, event) dict 36 | if a:event == 'stdout' 37 | let str = self.shell.' stdout: '.join(a:data) 38 | elseif a:event == 'stderr' 39 | let str = self.shell.' stderr: '.join(a:data) 40 | else 41 | let str = self.shell.' exited' 42 | endif 43 | 44 | call append(line('$'), str) 45 | endfunction 46 | let s:callbacks = { 47 | \ 'on_stdout': function('s:OnEvent'), 48 | \ 'on_stderr': function('s:OnEvent'), 49 | \ 'on_exit': function('s:OnEvent') 50 | \ } 51 | let job1 = jobstart(['bash'], extend({'shell': 'shell 1'}, s:callbacks)) 52 | let job2 = jobstart(['bash', '-c', 'for i in {1..10}; do echo hello $i!; sleep 1; done'], extend({'shell': 'shell 2'}, s:callbacks)) 53 | 54 | To test the above script, copy it to a file ~/foo.vim and run it: > 55 | nvim -u ~/foo.vim 56 | < 57 | Description of what happens: 58 | - Two bash shells are spawned by |jobstart()| with their stdin/stdout/stderr 59 | streams connected to nvim. 60 | - The first shell is idle, waiting to read commands from its stdin. 61 | - The second shell is started with -c which executes the command (a for-loop 62 | printing 0 through 9) and then exits. 63 | - `OnEvent()` callback is passed to |jobstart()| to handle various job 64 | events. It displays stdout/stderr data received from the shells. 65 | 66 | For |on_stdout| and |on_stderr| see |channel-callback|. 67 | *on_exit* 68 | Arguments passed to on_exit callback: 69 | 0: |job-id| 70 | 1: Exit-code of the process, or 128+SIGNUM if by signal (e.g. 143 on SIGTERM). 71 | 2: Event type: "exit" 72 | 73 | 74 | Note: Buffered stdout/stderr data which has not been flushed by the sender 75 | will not trigger the on_stdout/on_stderr callback (but if the process 76 | ends, the on_exit callback will be invoked). 77 | For example, "ruby -e" buffers output, so small strings will be 78 | buffered unless "auto-flushing" ($stdout.sync=true) is enabled. > 79 | function! Receive(job_id, data, event) 80 | echom printf('%s: %s',a:event,string(a:data)) 81 | endfunction 82 | call jobstart(['ruby', '-e', 83 | \ '$stdout.sync = true; 5.times do sleep 1 and puts "Hello Ruby!" end'], 84 | \ {'on_stdout': 'Receive'}) 85 | < https://github.com/neovim/neovim/issues/1592 86 | 87 | Note 2: 88 | Job event handlers may receive partial (incomplete) lines. For a given 89 | invocation of on_stdout/on_stderr, `a:data` is not guaranteed to end 90 | with a newline. 91 | - `abcdefg` may arrive as `['abc']`, `['defg']`. 92 | - `abc\nefg` may arrive as `['abc', '']`, `['efg']` or `['abc']`, 93 | `['','efg']`, or even `['ab']`, `['c','efg']`. 94 | Easy way to deal with this: initialize a list as `['']`, then append 95 | to it as follows: > 96 | let s:chunks = [''] 97 | func! s:on_stdout(job_id, data, event) dict 98 | let s:chunks[-1] .= a:data[0] 99 | call extend(s:chunks, a:data[1:]) 100 | endf 101 | < 102 | 103 | The |jobstart-options| dictionary is passed as |self| to the callback. 104 | The above example could be written in this "object-oriented" style: > 105 | 106 | let Shell = {} 107 | 108 | function Shell.on_stdout(_job_id, data, event) 109 | call append(line('$'), 110 | \ printf('[%s] %s: %s', a:event, self.name, join(a:data[:-2]))) 111 | endfunction 112 | 113 | let Shell.on_stderr = function(Shell.on_stdout) 114 | 115 | function Shell.on_exit(job_id, _data, event) 116 | let msg = printf('job %d ("%s") finished', a:job_id, self.name) 117 | call append(line('$'), printf('[%s] BOOM!', a:event)) 118 | call append(line('$'), printf('[%s] %s!', a:event, msg)) 119 | endfunction 120 | 121 | function Shell.new(name, cmd) 122 | let object = extend(copy(g:Shell), {'name': a:name}) 123 | let object.cmd = ['sh', '-c', a:cmd] 124 | let object.id = jobstart(object.cmd, object) 125 | $ 126 | return object 127 | endfunction 128 | 129 | let instance = Shell.new('bomb', 130 | \ 'for i in $(seq 9 -1 1); do echo $i 1>&$((i % 2 + 1)); sleep 1; done') 131 | < 132 | To send data to the job's stdin, use |chansend()|: > 133 | :call chansend(job1, "ls\n") 134 | :call chansend(job1, "invalid-command\n") 135 | :call chansend(job1, "exit\n") 136 | < 137 | A job may be killed with |jobstop()|: > 138 | :call jobstop(job1) 139 | < 140 | A job may be killed at any time with the |jobstop()| function: 141 | > 142 | :call jobstop(job1) 143 | < 144 | Individual streams can be closed without killing the job, see |chanclose()|. 145 | 146 | ============================================================================== 147 | vim:tw=78:ts=8:noet:ft=help:norl: 148 | -------------------------------------------------------------------------------- /doc/mlang.jax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vim-jp/nvimdoc-ja/a590737064a863a8ce5620e556ce21aba5e68287/doc/mlang.jax -------------------------------------------------------------------------------- /doc/mlang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vim-jp/nvimdoc-ja/a590737064a863a8ce5620e556ce21aba5e68287/doc/mlang.txt -------------------------------------------------------------------------------- /doc/msgpack_rpc.jax: -------------------------------------------------------------------------------- 1 | 2 | 3 | NVIM REFERENCE MANUAL 4 | 5 | This document was merged into |api.txt| and |develop.txt|. 6 | 7 | ============================================================================== 8 | vim:tw=78:ts=8:noet:ft=help:norl: 9 | -------------------------------------------------------------------------------- /doc/msgpack_rpc.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | NVIM REFERENCE MANUAL 4 | 5 | This document was merged into |api.txt| and |develop.txt|. 6 | 7 | ============================================================================== 8 | vim:tw=78:ts=8:noet:ft=help:norl: 9 | -------------------------------------------------------------------------------- /doc/nvim.jax: -------------------------------------------------------------------------------- 1 | *nvim.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL 5 | 6 | 7 | Nvim *nvim* *nvim-intro* 8 | 9 | Nvim is based on Vim by Bram Moolenaar. 10 | 11 | If you already use Vim see |nvim-from-vim| for a quickstart. 12 | If you are new to Vim, try the 30-minute tutorial: > 13 | 14 | :Tutor 15 | 16 | Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim 17 | (especially editor and VimL features) is maintained where possible. See 18 | |vim-differences| for the complete reference of differences from Vim. 19 | 20 | Type |gO| to see the table of contents. 21 | 22 | ============================================================================== 23 | Transitioning from Vim *nvim-from-vim* 24 | 25 | 1. To start the transition, create your |init.vim| (user config) file: > 26 | 27 | :call mkdir(stdpath('config'), 'p') 28 | :exe 'edit '.stdpath('config').'/init.vim' 29 | 30 | 2. Add these contents to the file: > 31 | 32 | set runtimepath^=~/.vim runtimepath+=~/.vim/after 33 | let &packpath = &runtimepath 34 | source ~/.vimrc 35 | 36 | 3. Restart Nvim, your existing Vim config will be loaded. 37 | 38 | See |provider-python| and |provider-clipboard| for additional software you 39 | might need to use some features. 40 | 41 | Your Vim configuration might not be entirely Nvim-compatible. 42 | See |vim-differences| for the full list of changes. 43 | 44 | The |'ttymouse'| option, for example, was removed from Nvim (mouse support 45 | should work without it). If you use the same |vimrc| for Vim and Nvim, 46 | consider guarding |'ttymouse'| in your configuration like so: 47 | > 48 | if !has('nvim') 49 | set ttymouse=xterm2 50 | endif 51 | < 52 | Conversely, if you have Nvim specific configuration items, you could do 53 | this: 54 | > 55 | if has('nvim') 56 | tnoremap 57 | endif 58 | < 59 | For a more granular approach use |exists()|: 60 | > 61 | if exists(':tnoremap') 62 | tnoremap 63 | endif 64 | < 65 | Now you should be able to explore Nvim more comfortably. Check |nvim-features| 66 | for more information. 67 | 68 | ============================================================================== 69 | vim:tw=78:ts=8:noet:ft=help:norl: 70 | -------------------------------------------------------------------------------- /doc/nvim.txt: -------------------------------------------------------------------------------- 1 | *nvim.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL 5 | 6 | 7 | Nvim *nvim* *nvim-intro* 8 | 9 | Nvim is based on Vim by Bram Moolenaar. 10 | 11 | If you already use Vim see |nvim-from-vim| for a quickstart. 12 | If you are new to Vim, try the 30-minute tutorial: > 13 | 14 | :Tutor 15 | 16 | Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim 17 | (especially editor and VimL features) is maintained where possible. See 18 | |vim-differences| for the complete reference of differences from Vim. 19 | 20 | Type |gO| to see the table of contents. 21 | 22 | ============================================================================== 23 | Transitioning from Vim *nvim-from-vim* 24 | 25 | 1. To start the transition, create your |init.vim| (user config) file: > 26 | 27 | :call mkdir(stdpath('config'), 'p') 28 | :exe 'edit '.stdpath('config').'/init.vim' 29 | 30 | 2. Add these contents to the file: > 31 | 32 | set runtimepath^=~/.vim runtimepath+=~/.vim/after 33 | let &packpath = &runtimepath 34 | source ~/.vimrc 35 | 36 | 3. Restart Nvim, your existing Vim config will be loaded. 37 | 38 | See |provider-python| and |provider-clipboard| for additional software you 39 | might need to use some features. 40 | 41 | Your Vim configuration might not be entirely Nvim-compatible. 42 | See |vim-differences| for the full list of changes. 43 | 44 | The |'ttymouse'| option, for example, was removed from Nvim (mouse support 45 | should work without it). If you use the same |vimrc| for Vim and Nvim, 46 | consider guarding |'ttymouse'| in your configuration like so: 47 | > 48 | if !has('nvim') 49 | set ttymouse=xterm2 50 | endif 51 | < 52 | Conversely, if you have Nvim specific configuration items, you could do 53 | this: 54 | > 55 | if has('nvim') 56 | tnoremap 57 | endif 58 | < 59 | For a more granular approach use |exists()|: 60 | > 61 | if exists(':tnoremap') 62 | tnoremap 63 | endif 64 | < 65 | Now you should be able to explore Nvim more comfortably. Check |nvim-features| 66 | for more information. 67 | 68 | ============================================================================== 69 | vim:tw=78:ts=8:noet:ft=help:norl: 70 | -------------------------------------------------------------------------------- /doc/pi_gzip.jax: -------------------------------------------------------------------------------- 1 | *pi_gzip.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Editing compressed files with Vim *gzip* *bzip2* *compress* 8 | 9 | 1. Autocommands |gzip-autocmd| 10 | 11 | The functionality mentioned here is a |standard-plugin|. 12 | This plugin is only available if 'compatible' is not set. 13 | You can avoid loading this plugin by setting the "loaded_gzip" variable: > 14 | :let loaded_gzip = 1 15 | 16 | ============================================================================== 17 | 1. Autocommands *gzip-autocmd* 18 | 19 | The plugin installs autocommands to intercept reading and writing of files 20 | with these extensions: 21 | 22 | extension compression ~ 23 | *.Z compress (Lempel-Ziv) 24 | *.gz gzip 25 | *.bz2 bzip2 26 | *.lzma lzma 27 | *.xz xz 28 | *.lz lzip 29 | *.zst zstd 30 | 31 | That's actually the only thing you need to know. There are no options. 32 | 33 | After decompressing a file, the filetype will be detected again. This will 34 | make a file like "foo.c.gz" get the "c" filetype. 35 | 36 | If you have 'patchmode' set, it will be appended after the extension for 37 | compression. Thus editing the patchmode file will not give you the automatic 38 | decompression. You have to rename the file if you want this. 39 | 40 | ============================================================================== 41 | vim:tw=78:ts=8:noet:ft=help:norl: 42 | -------------------------------------------------------------------------------- /doc/pi_gzip.txt: -------------------------------------------------------------------------------- 1 | *pi_gzip.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Editing compressed files with Vim *gzip* *bzip2* *compress* 8 | 9 | 1. Autocommands |gzip-autocmd| 10 | 11 | The functionality mentioned here is a |standard-plugin|. 12 | This plugin is only available if 'compatible' is not set. 13 | You can avoid loading this plugin by setting the "loaded_gzip" variable: > 14 | :let loaded_gzip = 1 15 | 16 | ============================================================================== 17 | 1. Autocommands *gzip-autocmd* 18 | 19 | The plugin installs autocommands to intercept reading and writing of files 20 | with these extensions: 21 | 22 | extension compression ~ 23 | *.Z compress (Lempel-Ziv) 24 | *.gz gzip 25 | *.bz2 bzip2 26 | *.lzma lzma 27 | *.xz xz 28 | *.lz lzip 29 | *.zst zstd 30 | 31 | That's actually the only thing you need to know. There are no options. 32 | 33 | After decompressing a file, the filetype will be detected again. This will 34 | make a file like "foo.c.gz" get the "c" filetype. 35 | 36 | If you have 'patchmode' set, it will be appended after the extension for 37 | compression. Thus editing the patchmode file will not give you the automatic 38 | decompression. You have to rename the file if you want this. 39 | 40 | ============================================================================== 41 | vim:tw=78:ts=8:noet:ft=help:norl: 42 | -------------------------------------------------------------------------------- /doc/pi_health.jax: -------------------------------------------------------------------------------- 1 | *pi_health.txt* Healthcheck framework 2 | 3 | Author: TJ DeVries 4 | 5 | Type |gO| to see the table of contents. 6 | 7 | ============================================================================== 8 | Introduction *health* 9 | 10 | health.vim is a minimal framework to help with troubleshooting user 11 | configuration. Nvim ships with healthchecks for configuration, performance, 12 | python support, ruby support, clipboard support, and more. 13 | 14 | To run the healthchecks, use this command: > 15 | 16 | :checkhealth 17 | < 18 | Plugin authors are encouraged to write new healthchecks. |health-dev| 19 | 20 | ============================================================================== 21 | Commands *health-commands* 22 | 23 | *:checkhealth* *:CheckHealth* 24 | :checkhealth Run all healthchecks. 25 | *E5009* 26 | Nvim depends on |$VIMRUNTIME| and 'runtimepath' to find 27 | the standard "runtime files" for syntax highlighting, 28 | filetype-specific behavior, and standard plugins 29 | (including :checkhealth). If the runtime files cannot 30 | be found then those features will not work. 31 | 32 | :checkhealth {plugins} 33 | Run healthcheck(s) for one or more plugins. E.g. to run 34 | only the standard Nvim healthcheck: > 35 | :checkhealth nvim 36 | < To run the healthchecks for the "foo" and "bar" plugins 37 | (assuming these plugins are on your 'runtimepath' and 38 | they have implemented health#foo#check() and 39 | health#bar#check(), respectively): > 40 | :checkhealth foo bar 41 | < 42 | ============================================================================== 43 | Functions *health-functions* 44 | 45 | health.vim functions are for creating new healthchecks. They mostly just do 46 | some layout and formatting, to give users a consistent presentation. 47 | 48 | health#report_start({name}) *health#report_start* 49 | Starts a new report. Most plugins should call this only once, but if 50 | you want different sections to appear in your report, call this once 51 | per section. 52 | 53 | health#report_info({msg}) *health#report_info* 54 | Reports an informational message. 55 | 56 | health#report_ok({msg}) *health#report_ok* 57 | Reports a "success" message. 58 | 59 | health#report_warn({msg}, [{advice}]) *health#report_warn* 60 | Reports a warning. {advice} is an optional List of suggestions. 61 | 62 | health#report_error({msg}, [{advice}]) *health#report_error* 63 | Reports an error. {advice} is an optional List of suggestions. 64 | 65 | health#{plugin}#check() *health.user_checker* 66 | Healthcheck function for {plugin}. Called by |:checkhealth| 67 | automatically. Example: > 68 | 69 | function! health#my_plug#check() abort 70 | silent call s:check_environment_vars() 71 | silent call s:check_python_configuration() 72 | endfunction 73 | < 74 | All output will be captured from the healthcheck. Use the 75 | health#report_* functions so that your healthcheck has a format 76 | consistent with the standard healthchecks. 77 | 78 | ============================================================================== 79 | Create a healthcheck *health-dev* 80 | 81 | Healthchecks are functions that check the user environment, configuration, 82 | etc. Nvim has built-in healthchecks in $VIMRUNTIME/autoload/health/. 83 | 84 | To add a new healthcheck for your own plugin, simply define a 85 | health#{plugin}#check() function in autoload/health/{plugin}.vim. 86 | |:checkhealth| automatically finds and invokes such functions. 87 | 88 | If your plugin is named "foo", then its healthcheck function must be > 89 | health#foo#check() 90 | 91 | defined in this file on 'runtimepath': > 92 | autoload/health/foo.vim 93 | 94 | Copy this sample code into autoload/health/foo.vim and replace "foo" with your 95 | plugin name: > 96 | function! health#foo#check() abort 97 | call health#report_start('sanity checks') 98 | " perform arbitrary checks 99 | " ... 100 | 101 | if looks_good 102 | call health#report_ok('found required dependencies') 103 | else 104 | call health#report_error('cannot find foo', 105 | \ ['npm install --save foo']) 106 | endif 107 | endfunction 108 | 109 | ============================================================================== 110 | 111 | vim:tw=78:ts=8:ft=help:fdm=marker 112 | -------------------------------------------------------------------------------- /doc/pi_health.txt: -------------------------------------------------------------------------------- 1 | *pi_health.txt* Healthcheck framework 2 | 3 | Author: TJ DeVries 4 | 5 | Type |gO| to see the table of contents. 6 | 7 | ============================================================================== 8 | Introduction *health* 9 | 10 | health.vim is a minimal framework to help with troubleshooting user 11 | configuration. Nvim ships with healthchecks for configuration, performance, 12 | python support, ruby support, clipboard support, and more. 13 | 14 | To run the healthchecks, use this command: > 15 | 16 | :checkhealth 17 | < 18 | Plugin authors are encouraged to write new healthchecks. |health-dev| 19 | 20 | ============================================================================== 21 | Commands *health-commands* 22 | 23 | *:checkhealth* *:CheckHealth* 24 | :checkhealth Run all healthchecks. 25 | *E5009* 26 | Nvim depends on |$VIMRUNTIME| and 'runtimepath' to find 27 | the standard "runtime files" for syntax highlighting, 28 | filetype-specific behavior, and standard plugins 29 | (including :checkhealth). If the runtime files cannot 30 | be found then those features will not work. 31 | 32 | :checkhealth {plugins} 33 | Run healthcheck(s) for one or more plugins. E.g. to run 34 | only the standard Nvim healthcheck: > 35 | :checkhealth nvim 36 | < To run the healthchecks for the "foo" and "bar" plugins 37 | (assuming these plugins are on your 'runtimepath' and 38 | they have implemented health#foo#check() and 39 | health#bar#check(), respectively): > 40 | :checkhealth foo bar 41 | < 42 | ============================================================================== 43 | Functions *health-functions* 44 | 45 | health.vim functions are for creating new healthchecks. They mostly just do 46 | some layout and formatting, to give users a consistent presentation. 47 | 48 | health#report_start({name}) *health#report_start* 49 | Starts a new report. Most plugins should call this only once, but if 50 | you want different sections to appear in your report, call this once 51 | per section. 52 | 53 | health#report_info({msg}) *health#report_info* 54 | Reports an informational message. 55 | 56 | health#report_ok({msg}) *health#report_ok* 57 | Reports a "success" message. 58 | 59 | health#report_warn({msg}, [{advice}]) *health#report_warn* 60 | Reports a warning. {advice} is an optional List of suggestions. 61 | 62 | health#report_error({msg}, [{advice}]) *health#report_error* 63 | Reports an error. {advice} is an optional List of suggestions. 64 | 65 | health#{plugin}#check() *health.user_checker* 66 | Healthcheck function for {plugin}. Called by |:checkhealth| 67 | automatically. Example: > 68 | 69 | function! health#my_plug#check() abort 70 | silent call s:check_environment_vars() 71 | silent call s:check_python_configuration() 72 | endfunction 73 | < 74 | All output will be captured from the healthcheck. Use the 75 | health#report_* functions so that your healthcheck has a format 76 | consistent with the standard healthchecks. 77 | 78 | ============================================================================== 79 | Create a healthcheck *health-dev* 80 | 81 | Healthchecks are functions that check the user environment, configuration, 82 | etc. Nvim has built-in healthchecks in $VIMRUNTIME/autoload/health/. 83 | 84 | To add a new healthcheck for your own plugin, simply define a 85 | health#{plugin}#check() function in autoload/health/{plugin}.vim. 86 | |:checkhealth| automatically finds and invokes such functions. 87 | 88 | If your plugin is named "foo", then its healthcheck function must be > 89 | health#foo#check() 90 | 91 | defined in this file on 'runtimepath': > 92 | autoload/health/foo.vim 93 | 94 | Copy this sample code into autoload/health/foo.vim and replace "foo" with your 95 | plugin name: > 96 | function! health#foo#check() abort 97 | call health#report_start('sanity checks') 98 | " perform arbitrary checks 99 | " ... 100 | 101 | if looks_good 102 | call health#report_ok('found required dependencies') 103 | else 104 | call health#report_error('cannot find foo', 105 | \ ['npm install --save foo']) 106 | endif 107 | endfunction 108 | 109 | ============================================================================== 110 | 111 | vim:tw=78:ts=8:ft=help:fdm=marker 112 | -------------------------------------------------------------------------------- /doc/pi_msgpack.jax: -------------------------------------------------------------------------------- 1 | *pi_msgpack.txt* msgpack utilities 2 | 3 | Author: Nikolay Pavlov 4 | Copyright: (c) 2015 by Nikolay Pavlov 5 | 6 | The Apache license applies to the files in this package, including 7 | runtime/autoload/msgpack.vim, runtime/doc/pi_msgpack.txt and 8 | test/functional/plugin/msgpack_spec.lua. Like anything else that's free, 9 | msgpack.vim and its associated files are provided *as is* and comes with no 10 | warranty of any kind, either expressed or implied. No guarantees of 11 | merchantability. No guarantees of suitability for any purpose. By using this 12 | plugin, you agree that in no event will the copyright holder be liable for any 13 | damages resulting from the use of this software. Use at your own risk! 14 | 15 | ============================================================================== 16 | 1. Contents *msgpack.vim-contents* 17 | 18 | 1. Contents..............................: |msgpack.vim-contents| 19 | 2. Msgpack.vim introduction..............: |msgpack.vim-intro| 20 | 3. Msgpack.vim manual....................: |msgpack.vim-manual| 21 | Function arguments....................: |msgpack.vim-arguments| 22 | msgpack#is_int function...............: |msgpack#is_int()| 23 | msgpack#is_uint function..............: |msgpack#is_uint()| 24 | msgpack#strftime function.............: |msgpack#strftime()| 25 | msgpack#strptime function.............: |msgpack#strptime()| 26 | msgpack#int_dict_to_str function......: |msgpack#int_dict_to_str()| 27 | msgpack#special_type function.........: |msgpack#special_type()| 28 | msgpack#type function.................: |msgpack#type()| 29 | msgpack#deepcopy function.............: |msgpack#deepcopy()| 30 | msgpack#string function...............: |msgpack#string()| 31 | msgpack#eval function.................: |msgpack#eval()| 32 | msgpack#equal function................: |msgpack#equal()| 33 | 34 | 35 | ============================================================================== 36 | 2. Msgpack.vim introduction *msgpack.vim-intro* 37 | 38 | This plugin contains utility functions to be used in conjunction with 39 | |msgpackdump()| and |msgpackparse()| functions. 40 | 41 | ============================================================================== 42 | 3. Msgpack.vim manual *msgpack.vim-manual* 43 | 44 | FUNCTION ARGUMENTS *msgpack.vim-arguments* 45 | 46 | Disambiguation of arguments described below. Note: if e.g. function is listed 47 | as accepting |{msgpack-integer}| (or anything else) it means that function 48 | does not check whether argument matches its description. 49 | 50 | *{msgpack-value}* Either |msgpack-special-dict| or a regular value, but 51 | not function reference. 52 | *{msgpack-integer}* Any value for which |msgpack#type()| will return 53 | "integer". 54 | *{msgpack-special-int}* |msgpack-special-dict| representing integer. 55 | 56 | msgpack#is_int({msgpack-value}) *msgpack#is_int()* 57 | Returns 1 if given {msgpack-value} is integer value, 0 otherwise. 58 | 59 | msgpack#is_uint({msgpack-value}) *msgpack#is_uint()* 60 | Returns 1 if given {msgpack-value} is integer value greater or equal 61 | to zero, 0 otherwise. 62 | 63 | *msgpack#strftime* 64 | msgpack#strftime({format}, {msgpack-integer}) *msgpack#strftime()* 65 | Same as |strftime()|, but second argument may be 66 | |msgpack-special-dict|. Requires |+python| or |+python3| to really 67 | work with |msgpack-special-dict|s. 68 | 69 | *msgpack#strptime* 70 | msgpack#strptime({format}, {time}) *msgpack#strptime()* 71 | Reverse of |msgpack#strptime()|: for any time and format 72 | |msgpack#equal|( |msgpack#strptime|(format, |msgpack#strftime|(format, 73 | time)), time) be true. Requires |+python| or |+python3|, without it 74 | only supports non-|msgpack-special-dict| nonnegative times and format 75 | equal to `%Y-%m-%dT%H:%M:%S`. 76 | 77 | msgpack#int_dict_to_str({msgpack-special-int}) *msgpack#int_dict_to_str()* 78 | Function which converts |msgpack-special-dict| integer value to 79 | a hexadecimal value like 0x1234567890ABCDEF (always returns exactly 16 80 | hexadecimal digits). 81 | 82 | msgpack#special_type({msgpack-value}) *msgpack#special_type()* 83 | Returns zero if {msgpack-value} is not |msgpack-special-dict|. If it 84 | is it returns name of the key in |v:msgpack_types| which represents 85 | {msgpack-value} type. 86 | 87 | msgpack#type({msgpack-value}) *msgpack#type()* 88 | Returns name of the key in |v:msgpack_types| that represents 89 | {msgpack-value} type. Never returns zero: this function returns 90 | msgpack type which will be dumped by |msgpackdump()| should it receive 91 | a list with singe {msgpack-value} as input. 92 | 93 | msgpack#deepcopy({msgpack-value}) *msgpack#deepcopy()* 94 | Like |deepcopy()|, but works correctly with |msgpack-special-dict| 95 | values. Plain |deepcopy()| will destroy all types in 96 | |msgpack-special-dict| values because it will copy _TYPE key values, 97 | while they should be preserved. 98 | 99 | msgpack#string({msgpack-value}) *msgpack#string()* 100 | Like |string()|, but saves information about msgpack types. Values 101 | dumped by msgpack#string may be read back by |msgpack#eval()|. 102 | Returns is the following: 103 | 104 | - Dictionaries are dumped as "{key1: value1, key2: value2}". Note: 105 | msgpack allows any values in keys, so with some 106 | |msgpack-special-dict| values |msgpack#string()| may produce even 107 | "{{1: 2}: 3, [4]: 5}". 108 | - Lists are dumped as "[value1, value2]". 109 | - Strings are dumped as 110 | 1. `"abc"`: binary string. 111 | 2. `="abc"`: string. 112 | 3. `+(10)"ext"`: extension strings (10 may be replaced with any 113 | 8-bit signed integer). 114 | Inside strings the following escape sequences may be present: "\0" 115 | (represents NUL byte), "\n" (represents line feed) and "\"" 116 | (represents double quote). 117 | - Floating-point and integer values are dumped using |string()| or 118 | |msgpack#int_dict_to_str()|. 119 | - Booleans are dumped as "TRUE" or "FALSE". 120 | - Nil values are dumped as "NIL". 121 | 122 | msgpack#eval({string}, {dict}) *msgpack#eval()* 123 | Transforms string created by |msgpack#string()| into a value suitable 124 | for |msgpackdump()|. Second argument allows adding special values 125 | that start with head characters (|/\h|) and contain only word 126 | characters (|/\w|). Built-in special values are "TRUE", "FALSE", 127 | "NIL", "nan" and "inf" and they cannot be overridden. Map values are 128 | always evaluated to |msgpack-special-dict| values, as well as 129 | hexadecimal digits. When evaluating maps order of keys is preserved. 130 | 131 | Note that in addition to regular integer representations that may be 132 | obtained using |msgpack#string()| msgpack#eval() also supports C-style 133 | “character” integer constants like `'/'` (equivalent to 134 | `char2nr('/')`: `47`). This also allows `'\0'` (number is decimal). 135 | 136 | *msgpack#equal* 137 | msgpack#equal({msgpack-value}, {msgpack-value}) *msgpack#equal()* 138 | Returns 1 if given values are equal, 0 otherwise. When comparing 139 | msgpack map values order of keys is ignored. Comparing 140 | |msgpack-special-dict| with equivalent non-special-dict value 141 | evaluates to 1. 142 | 143 | ============================================================================== 144 | vim:tw=78:ts=8:ft=help:fdm=marker 145 | -------------------------------------------------------------------------------- /doc/pi_msgpack.txt: -------------------------------------------------------------------------------- 1 | *pi_msgpack.txt* msgpack utilities 2 | 3 | Author: Nikolay Pavlov 4 | Copyright: (c) 2015 by Nikolay Pavlov 5 | 6 | The Apache license applies to the files in this package, including 7 | runtime/autoload/msgpack.vim, runtime/doc/pi_msgpack.txt and 8 | test/functional/plugin/msgpack_spec.lua. Like anything else that's free, 9 | msgpack.vim and its associated files are provided *as is* and comes with no 10 | warranty of any kind, either expressed or implied. No guarantees of 11 | merchantability. No guarantees of suitability for any purpose. By using this 12 | plugin, you agree that in no event will the copyright holder be liable for any 13 | damages resulting from the use of this software. Use at your own risk! 14 | 15 | ============================================================================== 16 | 1. Contents *msgpack.vim-contents* 17 | 18 | 1. Contents..............................: |msgpack.vim-contents| 19 | 2. Msgpack.vim introduction..............: |msgpack.vim-intro| 20 | 3. Msgpack.vim manual....................: |msgpack.vim-manual| 21 | Function arguments....................: |msgpack.vim-arguments| 22 | msgpack#is_int function...............: |msgpack#is_int()| 23 | msgpack#is_uint function..............: |msgpack#is_uint()| 24 | msgpack#strftime function.............: |msgpack#strftime()| 25 | msgpack#strptime function.............: |msgpack#strptime()| 26 | msgpack#int_dict_to_str function......: |msgpack#int_dict_to_str()| 27 | msgpack#special_type function.........: |msgpack#special_type()| 28 | msgpack#type function.................: |msgpack#type()| 29 | msgpack#deepcopy function.............: |msgpack#deepcopy()| 30 | msgpack#string function...............: |msgpack#string()| 31 | msgpack#eval function.................: |msgpack#eval()| 32 | msgpack#equal function................: |msgpack#equal()| 33 | 34 | 35 | ============================================================================== 36 | 2. Msgpack.vim introduction *msgpack.vim-intro* 37 | 38 | This plugin contains utility functions to be used in conjunction with 39 | |msgpackdump()| and |msgpackparse()| functions. 40 | 41 | ============================================================================== 42 | 3. Msgpack.vim manual *msgpack.vim-manual* 43 | 44 | FUNCTION ARGUMENTS *msgpack.vim-arguments* 45 | 46 | Disambiguation of arguments described below. Note: if e.g. function is listed 47 | as accepting |{msgpack-integer}| (or anything else) it means that function 48 | does not check whether argument matches its description. 49 | 50 | *{msgpack-value}* Either |msgpack-special-dict| or a regular value, but 51 | not function reference. 52 | *{msgpack-integer}* Any value for which |msgpack#type()| will return 53 | "integer". 54 | *{msgpack-special-int}* |msgpack-special-dict| representing integer. 55 | 56 | msgpack#is_int({msgpack-value}) *msgpack#is_int()* 57 | Returns 1 if given {msgpack-value} is integer value, 0 otherwise. 58 | 59 | msgpack#is_uint({msgpack-value}) *msgpack#is_uint()* 60 | Returns 1 if given {msgpack-value} is integer value greater or equal 61 | to zero, 0 otherwise. 62 | 63 | *msgpack#strftime* 64 | msgpack#strftime({format}, {msgpack-integer}) *msgpack#strftime()* 65 | Same as |strftime()|, but second argument may be 66 | |msgpack-special-dict|. Requires |+python| or |+python3| to really 67 | work with |msgpack-special-dict|s. 68 | 69 | *msgpack#strptime* 70 | msgpack#strptime({format}, {time}) *msgpack#strptime()* 71 | Reverse of |msgpack#strptime()|: for any time and format 72 | |msgpack#equal|( |msgpack#strptime|(format, |msgpack#strftime|(format, 73 | time)), time) be true. Requires |+python| or |+python3|, without it 74 | only supports non-|msgpack-special-dict| nonnegative times and format 75 | equal to `%Y-%m-%dT%H:%M:%S`. 76 | 77 | msgpack#int_dict_to_str({msgpack-special-int}) *msgpack#int_dict_to_str()* 78 | Function which converts |msgpack-special-dict| integer value to 79 | a hexadecimal value like 0x1234567890ABCDEF (always returns exactly 16 80 | hexadecimal digits). 81 | 82 | msgpack#special_type({msgpack-value}) *msgpack#special_type()* 83 | Returns zero if {msgpack-value} is not |msgpack-special-dict|. If it 84 | is it returns name of the key in |v:msgpack_types| which represents 85 | {msgpack-value} type. 86 | 87 | msgpack#type({msgpack-value}) *msgpack#type()* 88 | Returns name of the key in |v:msgpack_types| that represents 89 | {msgpack-value} type. Never returns zero: this function returns 90 | msgpack type which will be dumped by |msgpackdump()| should it receive 91 | a list with singe {msgpack-value} as input. 92 | 93 | msgpack#deepcopy({msgpack-value}) *msgpack#deepcopy()* 94 | Like |deepcopy()|, but works correctly with |msgpack-special-dict| 95 | values. Plain |deepcopy()| will destroy all types in 96 | |msgpack-special-dict| values because it will copy _TYPE key values, 97 | while they should be preserved. 98 | 99 | msgpack#string({msgpack-value}) *msgpack#string()* 100 | Like |string()|, but saves information about msgpack types. Values 101 | dumped by msgpack#string may be read back by |msgpack#eval()|. 102 | Returns is the following: 103 | 104 | - Dictionaries are dumped as "{key1: value1, key2: value2}". Note: 105 | msgpack allows any values in keys, so with some 106 | |msgpack-special-dict| values |msgpack#string()| may produce even 107 | "{{1: 2}: 3, [4]: 5}". 108 | - Lists are dumped as "[value1, value2]". 109 | - Strings are dumped as 110 | 1. `"abc"`: binary string. 111 | 2. `="abc"`: string. 112 | 3. `+(10)"ext"`: extension strings (10 may be replaced with any 113 | 8-bit signed integer). 114 | Inside strings the following escape sequences may be present: "\0" 115 | (represents NUL byte), "\n" (represents line feed) and "\"" 116 | (represents double quote). 117 | - Floating-point and integer values are dumped using |string()| or 118 | |msgpack#int_dict_to_str()|. 119 | - Booleans are dumped as "TRUE" or "FALSE". 120 | - Nil values are dumped as "NIL". 121 | 122 | msgpack#eval({string}, {dict}) *msgpack#eval()* 123 | Transforms string created by |msgpack#string()| into a value suitable 124 | for |msgpackdump()|. Second argument allows adding special values 125 | that start with head characters (|/\h|) and contain only word 126 | characters (|/\w|). Built-in special values are "TRUE", "FALSE", 127 | "NIL", "nan" and "inf" and they cannot be overridden. Map values are 128 | always evaluated to |msgpack-special-dict| values, as well as 129 | hexadecimal digits. When evaluating maps order of keys is preserved. 130 | 131 | Note that in addition to regular integer representations that may be 132 | obtained using |msgpack#string()| msgpack#eval() also supports C-style 133 | “character” integer constants like `'/'` (equivalent to 134 | `char2nr('/')`: `47`). This also allows `'\0'` (number is decimal). 135 | 136 | *msgpack#equal* 137 | msgpack#equal({msgpack-value}, {msgpack-value}) *msgpack#equal()* 138 | Returns 1 if given values are equal, 0 otherwise. When comparing 139 | msgpack map values order of keys is ignored. Comparing 140 | |msgpack-special-dict| with equivalent non-special-dict value 141 | evaluates to 1. 142 | 143 | ============================================================================== 144 | vim:tw=78:ts=8:ft=help:fdm=marker 145 | -------------------------------------------------------------------------------- /doc/pi_paren.jax: -------------------------------------------------------------------------------- 1 | *pi_paren.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Highlighting matching parens *matchparen* 8 | 9 | The functionality mentioned here is a |standard-plugin|. 10 | This plugin is only available if 'compatible' is not set. 11 | 12 | You can avoid loading this plugin by setting the "loaded_matchparen" variable: > 13 | :let loaded_matchparen = 1 14 | 15 | The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to 16 | redefine the match highlighting. 17 | 18 | *:NoMatchParen* *:DoMatchParen* 19 | To disable the plugin after it was loaded use this command: > 20 | 21 | :NoMatchParen 22 | 23 | And to enable it again: > 24 | 25 | :DoMatchParen 26 | 27 | The highlighting used is MatchParen. You can specify different colors with 28 | the ":highlight" command. Example: > 29 | 30 | :hi MatchParen ctermbg=blue guibg=lightblue 31 | 32 | The characters to be matched come from the 'matchpairs' option. You can 33 | change the value to highlight different matches. Note that not everything is 34 | possible. For example, you can't highlight single or double quotes, because 35 | the start and end are equal. 36 | 37 | The syntax highlighting attributes are used. When the cursor currently is not 38 | in a string or comment syntax item, then matches inside string and comment 39 | syntax items are ignored. Any syntax items with "string" or "comment" 40 | somewhere in their name are considered string or comment items. 41 | 42 | The search is limited to avoid a delay when moving the cursor. The limits 43 | are: 44 | - What is visible in the window. 45 | - 100 lines above or below the cursor to avoid a long delay when there are 46 | closed folds. 47 | - 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay 48 | in a long line with syntax highlighting. 49 | - A timeout of 300 msec (60 msec in Insert mode). This can be changed with the 50 | g:matchparen_timeout and g:matchparen_insert_timeout variables and their 51 | buffer-local equivalents b:matchparen_timeout and 52 | b:matchparen_insert_timeout. 53 | 54 | If you would like the |%| command to work better, the |matchit| plugin can be 55 | used. This plugin also helps to skip matches in comments. This is unrelated 56 | to the matchparen highlighting, they use a different mechanism. 57 | 58 | ============================================================================== 59 | vim:tw=78:ts=8:noet:ft=help:norl: 60 | -------------------------------------------------------------------------------- /doc/pi_paren.txt: -------------------------------------------------------------------------------- 1 | *pi_paren.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar 5 | 6 | 7 | Highlighting matching parens *matchparen* 8 | 9 | The functionality mentioned here is a |standard-plugin|. 10 | This plugin is only available if 'compatible' is not set. 11 | 12 | You can avoid loading this plugin by setting the "loaded_matchparen" variable: > 13 | :let loaded_matchparen = 1 14 | 15 | The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to 16 | redefine the match highlighting. 17 | 18 | *:NoMatchParen* *:DoMatchParen* 19 | To disable the plugin after it was loaded use this command: > 20 | 21 | :NoMatchParen 22 | 23 | And to enable it again: > 24 | 25 | :DoMatchParen 26 | 27 | The highlighting used is MatchParen. You can specify different colors with 28 | the ":highlight" command. Example: > 29 | 30 | :hi MatchParen ctermbg=blue guibg=lightblue 31 | 32 | The characters to be matched come from the 'matchpairs' option. You can 33 | change the value to highlight different matches. Note that not everything is 34 | possible. For example, you can't highlight single or double quotes, because 35 | the start and end are equal. 36 | 37 | The syntax highlighting attributes are used. When the cursor currently is not 38 | in a string or comment syntax item, then matches inside string and comment 39 | syntax items are ignored. Any syntax items with "string" or "comment" 40 | somewhere in their name are considered string or comment items. 41 | 42 | The search is limited to avoid a delay when moving the cursor. The limits 43 | are: 44 | - What is visible in the window. 45 | - 100 lines above or below the cursor to avoid a long delay when there are 46 | closed folds. 47 | - 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay 48 | in a long line with syntax highlighting. 49 | - A timeout of 300 msec (60 msec in Insert mode). This can be changed with the 50 | g:matchparen_timeout and g:matchparen_insert_timeout variables and their 51 | buffer-local equivalents b:matchparen_timeout and 52 | b:matchparen_insert_timeout. 53 | 54 | If you would like the |%| command to work better, the |matchit| plugin can be 55 | used. This plugin also helps to skip matches in comments. This is unrelated 56 | to the matchparen highlighting, they use a different mechanism. 57 | 58 | ============================================================================== 59 | vim:tw=78:ts=8:noet:ft=help:norl: 60 | -------------------------------------------------------------------------------- /doc/pi_spec.jax: -------------------------------------------------------------------------------- 1 | *pi_spec.txt* Nvim 2 | 3 | by Gustavo Niemeyer ~ 4 | 5 | This is a filetype plugin to work with rpm spec files. 6 | 7 | Currently, this Vim plugin allows you to easily update the %changelog 8 | section in RPM spec files. It will even create a section for you if it 9 | doesn't exist yet. If you've already inserted an entry today, it will 10 | give you the opportunity to just add a new item in today's entry. If you 11 | don't provide a format string (|spec_chglog_format|), it'll ask you an 12 | email address and build a format string by itself. 13 | 14 | 1. How to use it |spec-how-to-use-it| 15 | 2. Customizing |spec-customizing| 16 | 17 | ============================================================================== 18 | 1. How to use it *spec-how-to-use-it* 19 | 20 | The spec_chglog plugin provides a map like the following: 21 | 22 | :map c SpecChangelog 23 | 24 | It means that you may run the plugin inside a spec file by pressing 25 | your maplocalleader key (default is '\') plus 'c'. If you do not have 26 | |spec_chglog_format| set, the plugin will ask you for an email address 27 | to use in this edit session. 28 | 29 | Every time you run the plugin, it will check to see if the last entry in the 30 | changelog has been written today and by you. If the entry matches, it will 31 | just insert a new changelog item, otherwise it will create a new changelog 32 | entry. If you are running with |spec_chglog_release_info| enabled, it will 33 | also check if the name, version and release matches. The plugin is smart 34 | enough to ask you if it should update the package release, if you have not 35 | done so. 36 | 37 | Setting a map *spec-setting-a-map* 38 | ------------- 39 | 40 | As you should know, you can easily set a map to access any Vim command (or 41 | anything, for that matter). If you don't like the default map of 42 | c, you may just set up your own key. The following line 43 | shows you how you could do this in your vimrc file, mapping the plugin to 44 | the key: 45 | 46 | au FileType spec map SpecChangelog 47 | 48 | Note: the plugin will respect your desire to change the default mapping 49 | and won't set it. 50 | 51 | This command will add a map only in the spec file buffers. 52 | 53 | 54 | ============================================================================== 55 | 2. Customizing *spec-customizing* 56 | 57 | The format string *spec_chglog_format* 58 | ----------------- 59 | 60 | You can easily customize how your spec file entry will look like. To do 61 | this just set the variable "spec_chglog_format" in your vimrc file like 62 | this: > 63 | 64 | let spec_chglog_format = "%a %b %d %Y My Name " 65 | 66 | Note that "%a %b %d %Y" is the most used time format. If you don't provide 67 | a format string, when you run the SpecChangelog command for the first 68 | time, it will ask you an email address and build the |spec_chglog_format| 69 | variable for you. This way, you will only need to provide your email 70 | address once. 71 | 72 | To discover which format options you can use, take a look at the strftime() 73 | function man page. 74 | 75 | Where to insert new items *spec_chglog_prepend* 76 | ------------------------- 77 | 78 | The plugin will usually insert new %changelog entry items (note that it's 79 | not the entry itself) after the existing ones. If you set the 80 | spec_chglog_prepend variable > 81 | 82 | let spec_chglog_prepend = 1 83 | 84 | it will insert new items before the existing ones. 85 | 86 | Inserting release info *spec_chglog_release_info* 87 | ---------------------- 88 | 89 | If you want, the plugin may automatically insert release information 90 | on each changelog entry. One advantage of turning this feature on is 91 | that it may control if the release has been updated after the last 92 | change in the package or not. If you have not updated the package 93 | version or release, it will ask you if it should update the package 94 | release for you. To turn this feature on, just insert the following 95 | code in your vimrc: > 96 | 97 | let spec_chglog_release_info = 1 98 | 99 | Then, the first item in your changelog entry will be something like: > 100 | 101 | + name-1.0-1cl 102 | 103 | If you don't like the release updating feature and don't want to answer 104 | "No" each time it detects an old release, you may disable it with > 105 | 106 | let spec_chglog_never_increase_release = 1 107 | 108 | 109 | Good luck!! 110 | 111 | vim:tw=78:ts=8:noet:ft=help:norl: 112 | -------------------------------------------------------------------------------- /doc/pi_spec.txt: -------------------------------------------------------------------------------- 1 | *pi_spec.txt* Nvim 2 | 3 | by Gustavo Niemeyer ~ 4 | 5 | This is a filetype plugin to work with rpm spec files. 6 | 7 | Currently, this Vim plugin allows you to easily update the %changelog 8 | section in RPM spec files. It will even create a section for you if it 9 | doesn't exist yet. If you've already inserted an entry today, it will 10 | give you the opportunity to just add a new item in today's entry. If you 11 | don't provide a format string (|spec_chglog_format|), it'll ask you an 12 | email address and build a format string by itself. 13 | 14 | 1. How to use it |spec-how-to-use-it| 15 | 2. Customizing |spec-customizing| 16 | 17 | ============================================================================== 18 | 1. How to use it *spec-how-to-use-it* 19 | 20 | The spec_chglog plugin provides a map like the following: 21 | 22 | :map c SpecChangelog 23 | 24 | It means that you may run the plugin inside a spec file by pressing 25 | your maplocalleader key (default is '\') plus 'c'. If you do not have 26 | |spec_chglog_format| set, the plugin will ask you for an email address 27 | to use in this edit session. 28 | 29 | Every time you run the plugin, it will check to see if the last entry in the 30 | changelog has been written today and by you. If the entry matches, it will 31 | just insert a new changelog item, otherwise it will create a new changelog 32 | entry. If you are running with |spec_chglog_release_info| enabled, it will 33 | also check if the name, version and release matches. The plugin is smart 34 | enough to ask you if it should update the package release, if you have not 35 | done so. 36 | 37 | Setting a map *spec-setting-a-map* 38 | ------------- 39 | 40 | As you should know, you can easily set a map to access any Vim command (or 41 | anything, for that matter). If you don't like the default map of 42 | c, you may just set up your own key. The following line 43 | shows you how you could do this in your vimrc file, mapping the plugin to 44 | the key: 45 | 46 | au FileType spec map SpecChangelog 47 | 48 | Note: the plugin will respect your desire to change the default mapping 49 | and won't set it. 50 | 51 | This command will add a map only in the spec file buffers. 52 | 53 | 54 | ============================================================================== 55 | 2. Customizing *spec-customizing* 56 | 57 | The format string *spec_chglog_format* 58 | ----------------- 59 | 60 | You can easily customize how your spec file entry will look like. To do 61 | this just set the variable "spec_chglog_format" in your vimrc file like 62 | this: > 63 | 64 | let spec_chglog_format = "%a %b %d %Y My Name " 65 | 66 | Note that "%a %b %d %Y" is the most used time format. If you don't provide 67 | a format string, when you run the SpecChangelog command for the first 68 | time, it will ask you an email address and build the |spec_chglog_format| 69 | variable for you. This way, you will only need to provide your email 70 | address once. 71 | 72 | To discover which format options you can use, take a look at the strftime() 73 | function man page. 74 | 75 | Where to insert new items *spec_chglog_prepend* 76 | ------------------------- 77 | 78 | The plugin will usually insert new %changelog entry items (note that it's 79 | not the entry itself) after the existing ones. If you set the 80 | spec_chglog_prepend variable > 81 | 82 | let spec_chglog_prepend = 1 83 | 84 | it will insert new items before the existing ones. 85 | 86 | Inserting release info *spec_chglog_release_info* 87 | ---------------------- 88 | 89 | If you want, the plugin may automatically insert release information 90 | on each changelog entry. One advantage of turning this feature on is 91 | that it may control if the release has been updated after the last 92 | change in the package or not. If you have not updated the package 93 | version or release, it will ask you if it should update the package 94 | release for you. To turn this feature on, just insert the following 95 | code in your vimrc: > 96 | 97 | let spec_chglog_release_info = 1 98 | 99 | Then, the first item in your changelog entry will be something like: > 100 | 101 | + name-1.0-1cl 102 | 103 | If you don't like the release updating feature and don't want to answer 104 | "No" each time it detects an old release, you may disable it with > 105 | 106 | let spec_chglog_never_increase_release = 1 107 | 108 | 109 | Good luck!! 110 | 111 | vim:tw=78:ts=8:noet:ft=help:norl: 112 | -------------------------------------------------------------------------------- /doc/pi_tar.jax: -------------------------------------------------------------------------------- 1 | *pi_tar.txt* Nvim 2 | 3 | +====================+ 4 | | Tar File Interface | 5 | +====================+ 6 | 7 | Author: Charles E. Campbell 8 | (remove NOSPAM from Campbell's email first) 9 | Copyright 2005-2012: *tar-copyright* 10 | The VIM LICENSE (see |copyright|) applies to the files in this 11 | package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like 12 | anything else that's except use "tar.vim" instead of "VIM". Like 13 | anything else that's free, tar.vim and its associated files are 14 | provided *as is* and comes with no warranty of any kind, either 15 | expressed or implied. No guarantees of merchantability. No 16 | guarantees of suitability for any purpose. By using this plugin, you 17 | agree that in no event will the copyright holder be liable for any 18 | damages resulting from the use of this software. Use at your own risk! 19 | 20 | ============================================================================== 21 | 1. Contents *tar* *tar-contents* 22 | 1. Contents..................................................|tar-contents| 23 | 2. Usage.....................................................|tar-usage| 24 | 3. Options...................................................|tar-options| 25 | 4. History...................................................|tar-history| 26 | 27 | ============================================================================== 28 | 2. Usage *tar-usage* *tar-manual* 29 | 30 | When one edits a *.tar file, this plugin will handle displaying a 31 | contents page. Select a file to edit by moving the cursor atop 32 | the desired file, then hit the key. After editing, one may 33 | also write to the file. Currently, one may not make a new file in 34 | tar archives via the plugin. 35 | 36 | *:Vimuntar* 37 | VIMUNTAR~ 38 | 39 | :Vimuntar [vimhome] 40 | 41 | This command copies, if necessary, the tarball to the .vim or vimfiles 42 | directory using the first writable directory in the |'runtimepath'| 43 | when no [vimhome] is specified. Otherwise, the [vimhome] argument 44 | allows the user to specify that directory, instead. 45 | 46 | The copy is done using the command in *g:tar_copycmd* , which is > 47 | cp for cygwin, unix, macunix 48 | copy for windows (32, 95, 64, 16) 49 | < The extraction is done with the command specified with 50 | *g:tar_extractcmd* , which by default is > 51 | "tar -xf" 52 | < 53 | *:TarDiff* 54 | DIFFERENCING SUPPORT~ 55 | 56 | :TarDiff [filename] 57 | 58 | This command will attempt to show the differences between the tarball 59 | version of a file and the associated file on the system. In order to 60 | find that file on the system, the script uses the path associated with 61 | the file mentioned in the tarball. If the current directory is not 62 | correct for that path, :TarDiff will fail to find the associated file. 63 | 64 | If the [filename] is given, that that filename (and path) will be used 65 | to specify the associated file. 66 | 67 | 68 | PREVENTING LOADING~ 69 | 70 | If for some reason you do not wish to use vim to examine tar'd files, 71 | you may put the following two variables into your <.vimrc> to prevent 72 | the tar plugin from loading: > 73 | 74 | let g:loaded_tarPlugin= 1 75 | let g:loaded_tar = 1 76 | < 77 | 78 | ============================================================================== 79 | 3. Options *tar-options* 80 | 81 | These options are variables that one may change, typically in one's 82 | <.vimrc> file. 83 | Default 84 | Variable Value Explanation 85 | *g:tar_browseoptions* "Ptf" used to get a list of contents 86 | *g:tar_readoptions* "OPxf" used to extract a file from a tarball 87 | *g:tar_cmd* "tar" the name of the tar program 88 | *g:tar_nomax* 0 if true, file window will not be maximized 89 | *g:tar_secure* undef if exists: 90 | "--"s will be used to prevent unwanted 91 | option expansion in tar commands. 92 | Please be sure that your tar command 93 | accepts "--"; Posix compliant tar 94 | utilities do accept them. 95 | if not exists: 96 | The tar plugin will reject any tar 97 | files or member files that begin with 98 | "-" 99 | Not all tar's support the "--" which is why 100 | it isn't default. 101 | *g:tar_writeoptions* "uf" used to update/replace a file 102 | 103 | 104 | ============================================================================== 105 | 4. History *tar-history* 106 | 107 | 108 | v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz) 109 | v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling 110 | * inserted additional |:keepj| modifiers 111 | * changed silent to sil! (|:silent|) 112 | v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold 113 | tarfile name 114 | * inserted keepj before 0d to protect jump list 115 | v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression 116 | v24 Apr 07, 2009 * :Untarvim command implemented 117 | Sep 28, 2009 * Added lzma support 118 | v22 Aug 08, 2008 * security fixes 119 | v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files 120 | inside tarballs. Fixes a problem with tarballs called 121 | things like c:\abc.tar. (tnx to Bill McCarthy) 122 | v14 May 09, 2008 * arno caught a security bug 123 | May 28, 2008 * various security improvements. Now requires patch 299 124 | which provides the fnameescape() function 125 | May 30, 2008 * allows one to view *.gz and *.bz2 files that are in 126 | *.tar files. 127 | v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq 128 | v10 May 02, 2006 * now using "redraw then echo" to show messages, instead 129 | of "echo and prompt user" 130 | v9 May 02, 2006 * improved detection of masquerading as tar file 131 | v8 May 02, 2006 * allows editing of files that merely masquerade as tar 132 | files 133 | v7 Mar 22, 2006 * work on making tar plugin work across network 134 | Mar 27, 2006 * g:tar_cmd now available for users to change the name 135 | of the tar program to be used. By default, of course, 136 | it's "tar". 137 | v6 Dec 21, 2005 * writing to files not in directories caused problems - 138 | fixed (pointed out by Christian Robinson) 139 | v5 Nov 22, 2005 * report option workaround installed 140 | v3 Sep 16, 2005 * handles writing files in an archive back to the 141 | archive 142 | Oct 18, 2005 * used instead of in autocmds 143 | Oct 18, 2005 * handles writing to compressed archives 144 | Nov 03, 2005 * handles writing tarfiles across a network using 145 | netrw#NetWrite() 146 | v2 * converted to use Vim7's new autoload feature by 147 | Bram Moolenaar 148 | v1 (original) * Michael Toren (see http://michael.toren.net/code/) 149 | 150 | ============================================================================== 151 | vim:tw=78:ts=8:noet:ft=help 152 | -------------------------------------------------------------------------------- /doc/pi_tar.txt: -------------------------------------------------------------------------------- 1 | *pi_tar.txt* Nvim 2 | 3 | +====================+ 4 | | Tar File Interface | 5 | +====================+ 6 | 7 | Author: Charles E. Campbell 8 | (remove NOSPAM from Campbell's email first) 9 | Copyright 2005-2012: *tar-copyright* 10 | The VIM LICENSE (see |copyright|) applies to the files in this 11 | package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like 12 | anything else that's except use "tar.vim" instead of "VIM". Like 13 | anything else that's free, tar.vim and its associated files are 14 | provided *as is* and comes with no warranty of any kind, either 15 | expressed or implied. No guarantees of merchantability. No 16 | guarantees of suitability for any purpose. By using this plugin, you 17 | agree that in no event will the copyright holder be liable for any 18 | damages resulting from the use of this software. Use at your own risk! 19 | 20 | ============================================================================== 21 | 1. Contents *tar* *tar-contents* 22 | 1. Contents..................................................|tar-contents| 23 | 2. Usage.....................................................|tar-usage| 24 | 3. Options...................................................|tar-options| 25 | 4. History...................................................|tar-history| 26 | 27 | ============================================================================== 28 | 2. Usage *tar-usage* *tar-manual* 29 | 30 | When one edits a *.tar file, this plugin will handle displaying a 31 | contents page. Select a file to edit by moving the cursor atop 32 | the desired file, then hit the key. After editing, one may 33 | also write to the file. Currently, one may not make a new file in 34 | tar archives via the plugin. 35 | 36 | *:Vimuntar* 37 | VIMUNTAR~ 38 | 39 | :Vimuntar [vimhome] 40 | 41 | This command copies, if necessary, the tarball to the .vim or vimfiles 42 | directory using the first writable directory in the |'runtimepath'| 43 | when no [vimhome] is specified. Otherwise, the [vimhome] argument 44 | allows the user to specify that directory, instead. 45 | 46 | The copy is done using the command in *g:tar_copycmd* , which is > 47 | cp for cygwin, unix, macunix 48 | copy for windows (32, 95, 64, 16) 49 | < The extraction is done with the command specified with 50 | *g:tar_extractcmd* , which by default is > 51 | "tar -xf" 52 | < 53 | *:TarDiff* 54 | DIFFERENCING SUPPORT~ 55 | 56 | :TarDiff [filename] 57 | 58 | This command will attempt to show the differences between the tarball 59 | version of a file and the associated file on the system. In order to 60 | find that file on the system, the script uses the path associated with 61 | the file mentioned in the tarball. If the current directory is not 62 | correct for that path, :TarDiff will fail to find the associated file. 63 | 64 | If the [filename] is given, that that filename (and path) will be used 65 | to specify the associated file. 66 | 67 | 68 | PREVENTING LOADING~ 69 | 70 | If for some reason you do not wish to use vim to examine tar'd files, 71 | you may put the following two variables into your <.vimrc> to prevent 72 | the tar plugin from loading: > 73 | 74 | let g:loaded_tarPlugin= 1 75 | let g:loaded_tar = 1 76 | < 77 | 78 | ============================================================================== 79 | 3. Options *tar-options* 80 | 81 | These options are variables that one may change, typically in one's 82 | <.vimrc> file. 83 | Default 84 | Variable Value Explanation 85 | *g:tar_browseoptions* "Ptf" used to get a list of contents 86 | *g:tar_readoptions* "OPxf" used to extract a file from a tarball 87 | *g:tar_cmd* "tar" the name of the tar program 88 | *g:tar_nomax* 0 if true, file window will not be maximized 89 | *g:tar_secure* undef if exists: 90 | "--"s will be used to prevent unwanted 91 | option expansion in tar commands. 92 | Please be sure that your tar command 93 | accepts "--"; Posix compliant tar 94 | utilities do accept them. 95 | if not exists: 96 | The tar plugin will reject any tar 97 | files or member files that begin with 98 | "-" 99 | Not all tar's support the "--" which is why 100 | it isn't default. 101 | *g:tar_writeoptions* "uf" used to update/replace a file 102 | 103 | 104 | ============================================================================== 105 | 4. History *tar-history* 106 | 107 | 108 | v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz) 109 | v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling 110 | * inserted additional |:keepj| modifiers 111 | * changed silent to sil! (|:silent|) 112 | v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold 113 | tarfile name 114 | * inserted keepj before 0d to protect jump list 115 | v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression 116 | v24 Apr 07, 2009 * :Untarvim command implemented 117 | Sep 28, 2009 * Added lzma support 118 | v22 Aug 08, 2008 * security fixes 119 | v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files 120 | inside tarballs. Fixes a problem with tarballs called 121 | things like c:\abc.tar. (tnx to Bill McCarthy) 122 | v14 May 09, 2008 * arno caught a security bug 123 | May 28, 2008 * various security improvements. Now requires patch 299 124 | which provides the fnameescape() function 125 | May 30, 2008 * allows one to view *.gz and *.bz2 files that are in 126 | *.tar files. 127 | v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq 128 | v10 May 02, 2006 * now using "redraw then echo" to show messages, instead 129 | of "echo and prompt user" 130 | v9 May 02, 2006 * improved detection of masquerading as tar file 131 | v8 May 02, 2006 * allows editing of files that merely masquerade as tar 132 | files 133 | v7 Mar 22, 2006 * work on making tar plugin work across network 134 | Mar 27, 2006 * g:tar_cmd now available for users to change the name 135 | of the tar program to be used. By default, of course, 136 | it's "tar". 137 | v6 Dec 21, 2005 * writing to files not in directories caused problems - 138 | fixed (pointed out by Christian Robinson) 139 | v5 Nov 22, 2005 * report option workaround installed 140 | v3 Sep 16, 2005 * handles writing files in an archive back to the 141 | archive 142 | Oct 18, 2005 * used instead of in autocmds 143 | Oct 18, 2005 * handles writing to compressed archives 144 | Nov 03, 2005 * handles writing tarfiles across a network using 145 | netrw#NetWrite() 146 | v2 * converted to use Vim7's new autoload feature by 147 | Bram Moolenaar 148 | v1 (original) * Michael Toren (see http://michael.toren.net/code/) 149 | 150 | ============================================================================== 151 | vim:tw=78:ts=8:noet:ft=help 152 | -------------------------------------------------------------------------------- /doc/pi_tutor.jax: -------------------------------------------------------------------------------- 1 | *pi_tutor.txt* Interactive tutorials. 2 | *vim-tutor-mode* 3 | 4 | vim-tutor-mode provides a system to follow and create interactive tutorials 5 | for vim and third party plugins. It replaces the venerable `vimtutor` system. 6 | 7 | ============================================================================== 8 | 1. Usage *vim-tutor-usage* 9 | 10 | vim-tutor-mode tutorials are hypertext documents, they have rich text and 11 | contain links. To stand out from the rest of the text, links are underlined. 12 | You can follow them by placing the cursor over them and pressing , or 13 | by double-clicking them. 14 | 15 | 1.1 Commands 16 | ------------ 17 | *:Tutor* 18 | :Tutor {tutorial} Opens a tutorial. Command-line completion for 19 | {tutorial} is provided, the candidates are a list of 20 | '.tutor' files found in the 'tutor/' folder in 21 | the 'runtimepath'. Tutorials prefixed with 'vim-' will 22 | always be shown first. 23 | 24 | If no {tutorial} is provided, the command starts the 25 | 'vim-01-beginner' tutorial, which is equivalent to 26 | Vim's `vimtutor`. 27 | 28 | ============================================================================= 29 | 2. Creating tutorials *vim-tutor-create* 30 | 31 | Writing vim-tutor-mode tutorials is easy. For an overview of the format used, 32 | please consult the 'tutor.tutor' file: > 33 | 34 | :Tutor tutor 35 | < 36 | New tutorials must be placed in the 'tutor/' folder in the 'runtimepath' 37 | to be detected by the :Tutor command. 38 | 39 | It is recommended to use a less formal style when writing tutorials than in 40 | regular documentation (unless the content requires it). 41 | 42 | ============================================================================ 43 | 3. Contributing 44 | 45 | Development of the plugin is done over at github [1]. Feel free to report 46 | issues and make suggestions. 47 | 48 | [1]: https://github.com/fmoralesc/vim-tutor-mode 49 | 50 | " vim: set ft=help : 51 | -------------------------------------------------------------------------------- /doc/pi_tutor.txt: -------------------------------------------------------------------------------- 1 | *pi_tutor.txt* Interactive tutorials. 2 | *vim-tutor-mode* 3 | 4 | vim-tutor-mode provides a system to follow and create interactive tutorials 5 | for vim and third party plugins. It replaces the venerable `vimtutor` system. 6 | 7 | ============================================================================== 8 | 1. Usage *vim-tutor-usage* 9 | 10 | vim-tutor-mode tutorials are hypertext documents, they have rich text and 11 | contain links. To stand out from the rest of the text, links are underlined. 12 | You can follow them by placing the cursor over them and pressing , or 13 | by double-clicking them. 14 | 15 | 1.1 Commands 16 | ------------ 17 | *:Tutor* 18 | :Tutor {tutorial} Opens a tutorial. Command-line completion for 19 | {tutorial} is provided, the candidates are a list of 20 | '.tutor' files found in the 'tutor/' folder in 21 | the 'runtimepath'. Tutorials prefixed with 'vim-' will 22 | always be shown first. 23 | 24 | If no {tutorial} is provided, the command starts the 25 | 'vim-01-beginner' tutorial, which is equivalent to 26 | Vim's `vimtutor`. 27 | 28 | ============================================================================= 29 | 2. Creating tutorials *vim-tutor-create* 30 | 31 | Writing vim-tutor-mode tutorials is easy. For an overview of the format used, 32 | please consult the 'tutor.tutor' file: > 33 | 34 | :Tutor tutor 35 | < 36 | New tutorials must be placed in the 'tutor/' folder in the 'runtimepath' 37 | to be detected by the :Tutor command. 38 | 39 | It is recommended to use a less formal style when writing tutorials than in 40 | regular documentation (unless the content requires it). 41 | 42 | ============================================================================ 43 | 3. Contributing 44 | 45 | Development of the plugin is done over at github [1]. Feel free to report 46 | issues and make suggestions. 47 | 48 | [1]: https://github.com/fmoralesc/vim-tutor-mode 49 | 50 | " vim: set ft=help : 51 | -------------------------------------------------------------------------------- /doc/pi_zip.jax: -------------------------------------------------------------------------------- 1 | *pi_zip.txt* Nvim 2 | 3 | +====================+ 4 | | Zip File Interface | 5 | +====================+ 6 | 7 | Author: Charles E. Campbell 8 | (remove NOSPAM from Campbell's email first) 9 | Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* 10 | The VIM LICENSE (see |copyright|) applies to the files in this 11 | package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use 12 | "zip.vim" instead of "VIM". Like anything else that's free, zip.vim 13 | and its associated files are provided *as is* and comes with no 14 | warranty of any kind, either expressed or implied. No guarantees of 15 | merchantability. No guarantees of suitability for any purpose. By 16 | using this plugin, you agree that in no event will the copyright 17 | holder be liable for any damages resulting from the use of this 18 | software. Use at your own risk! 19 | 20 | ============================================================================== 21 | 1. Contents *zip* *zip-contents* 22 | 1. Contents................................................|zip-contents| 23 | 2. Usage...................................................|zip-usage| 24 | 3. Additional Extensions...................................|zip-extension| 25 | 4. History.................................................|zip-history| 26 | 27 | ============================================================================== 28 | 2. Usage *zip-usage* *zip-manual* 29 | 30 | When one edits a *.zip file, this plugin will handle displaying a 31 | contents page. Select a file to edit by moving the cursor atop 32 | the desired file, then hit the key. After editing, one may 33 | also write to the file. Currently, one may not make a new file in 34 | zip archives via the plugin. 35 | 36 | *zip-x* 37 | x : may extract a listed file when the cursor is atop it 38 | 39 | OPTIONS 40 | 41 | *g:zip_nomax* 42 | 43 | If this variable exists and is true, the file window will not be 44 | automatically maximized when opened. 45 | 46 | *g:zip_shq* 47 | Different operating systems may use one or more shells to execute 48 | commands. Zip will try to guess the correct quoting mechanism to 49 | allow spaces and whatnot in filenames; however, if it is incorrectly 50 | guessing the quote to use for your setup, you may use > 51 | g:zip_shq 52 | < which by default is a single quote under Unix (') and a double quote 53 | under Windows ("). If you'd rather have no quotes, simply set 54 | g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>. 55 | 56 | *g:zip_unzipcmd* 57 | Use this option to specify the program which does the duty of "unzip". 58 | It's used during browsing. By default: > 59 | let g:zip_unzipcmd= "unzip" 60 | < 61 | *g:zip_zipcmd* 62 | Use this option to specify the program which does the duty of "zip". 63 | It's used during the writing (updating) of a file already in a zip 64 | file; by default: > 65 | let g:zip_zipcmd= "zip" 66 | < 67 | *g:zip_extractcmd* 68 | This option specifies the program (and any options needed) used to 69 | extract a file from a zip archive. By default, > 70 | let g:zip_extractcmd= g:zip_unzipcmd 71 | < 72 | PREVENTING LOADING~ 73 | 74 | If for some reason you do not wish to use vim to examine zipped files, 75 | you may put the following two variables into your <.vimrc> to prevent 76 | the zip plugin from loading: > 77 | 78 | let g:loaded_zipPlugin= 1 79 | let g:loaded_zip = 1 80 | < 81 | 82 | ============================================================================== 83 | 3. Additional Extensions *zip-extension* 84 | 85 | Apparently there are a number of archivers which generate zip files that 86 | don't use the .zip extension (.jar, .xpi, etc). To handle such files, 87 | place a line in your <.vimrc> file: > 88 | 89 | au BufReadCmd *.jar,*.xpi call zip#Browse(expand("")) 90 | < 91 | One can simply extend this line to accommodate additional extensions that 92 | should be treated as zip files. 93 | 94 | Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc. 95 | Currently (11/30/15) it holds: > 96 | 97 | let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip, 98 | \ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm, 99 | \ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm, 100 | \ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub' 101 | 102 | ============================================================================== 103 | 4. History *zip-history* {{{1 104 | v28 Oct 08, 2014 * changed the sanity checks for executables to reflect 105 | the command actually to be attempted in zip#Read() 106 | and zip#Write() 107 | * added the extraction of a file capability 108 | Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list 109 | Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and 110 | sorted the suffices. 111 | v27 Jul 02, 2013 * sanity check: zipfile must have "PK" as its first 112 | two bytes. 113 | * modified to allow zipfile: entries in quickfix lists 114 | v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that 115 | are synonyms for .zip 116 | v25 Jun 27, 2011 * using keepj with unzip -Z 117 | (consistent with the -p variant) 118 | * (Ben Staniford) now uses 119 | has("win32unix") && executable("cygpath") 120 | before converting to cygwin-style paths 121 | v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames 122 | fnameescape'd as well as shellquote'd 123 | * (Motoya Kurotsu) inserted keepj before 0d to protect 124 | jump list 125 | v17 May 09, 2008 * arno caught a security bug 126 | v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq 127 | v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem 128 | when editing alternate file to bring up a zipfile 129 | v10 May 02, 2006 * now using "redraw then echo" to show messages, instead 130 | of "echo and prompt user" 131 | * g:zip_shq provided to allow for quoting control for the 132 | command being passed via :r! ... commands. 133 | v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message 134 | due to "Pattern not found: ^.*\%0c"; this was caused by 135 | stridx finding a Name... at the beginning of the line; 136 | zip.vim tried 4,$s/^.*\%0c//, but that doesn't work. 137 | Fixed. 138 | v7 Mar 22, 2006 * escaped some characters that can cause filename handling 139 | problems. 140 | v6 Dec 21, 2005 * writing to files not in directories caused problems - 141 | fixed (pointed out by Christian Robinson) 142 | v5 Nov 22, 2005 * report option workaround installed 143 | v3 Oct 18, 2005 * used instead of in autocmds 144 | v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt) 145 | * began testing under Windows; works thus far 146 | * filetype detection fixed 147 | Nov 03, 2005 * handles writing zipfiles across a network using 148 | netrw#NetWrite() 149 | v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing 150 | 151 | ============================================================================== 152 | vim:tw=78:ts=8:noet:ft=help:fdm=marker 153 | -------------------------------------------------------------------------------- /doc/pi_zip.txt: -------------------------------------------------------------------------------- 1 | *pi_zip.txt* Nvim 2 | 3 | +====================+ 4 | | Zip File Interface | 5 | +====================+ 6 | 7 | Author: Charles E. Campbell 8 | (remove NOSPAM from Campbell's email first) 9 | Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* 10 | The VIM LICENSE (see |copyright|) applies to the files in this 11 | package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use 12 | "zip.vim" instead of "VIM". Like anything else that's free, zip.vim 13 | and its associated files are provided *as is* and comes with no 14 | warranty of any kind, either expressed or implied. No guarantees of 15 | merchantability. No guarantees of suitability for any purpose. By 16 | using this plugin, you agree that in no event will the copyright 17 | holder be liable for any damages resulting from the use of this 18 | software. Use at your own risk! 19 | 20 | ============================================================================== 21 | 1. Contents *zip* *zip-contents* 22 | 1. Contents................................................|zip-contents| 23 | 2. Usage...................................................|zip-usage| 24 | 3. Additional Extensions...................................|zip-extension| 25 | 4. History.................................................|zip-history| 26 | 27 | ============================================================================== 28 | 2. Usage *zip-usage* *zip-manual* 29 | 30 | When one edits a *.zip file, this plugin will handle displaying a 31 | contents page. Select a file to edit by moving the cursor atop 32 | the desired file, then hit the key. After editing, one may 33 | also write to the file. Currently, one may not make a new file in 34 | zip archives via the plugin. 35 | 36 | *zip-x* 37 | x : may extract a listed file when the cursor is atop it 38 | 39 | OPTIONS 40 | 41 | *g:zip_nomax* 42 | 43 | If this variable exists and is true, the file window will not be 44 | automatically maximized when opened. 45 | 46 | *g:zip_shq* 47 | Different operating systems may use one or more shells to execute 48 | commands. Zip will try to guess the correct quoting mechanism to 49 | allow spaces and whatnot in filenames; however, if it is incorrectly 50 | guessing the quote to use for your setup, you may use > 51 | g:zip_shq 52 | < which by default is a single quote under Unix (') and a double quote 53 | under Windows ("). If you'd rather have no quotes, simply set 54 | g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>. 55 | 56 | *g:zip_unzipcmd* 57 | Use this option to specify the program which does the duty of "unzip". 58 | It's used during browsing. By default: > 59 | let g:zip_unzipcmd= "unzip" 60 | < 61 | *g:zip_zipcmd* 62 | Use this option to specify the program which does the duty of "zip". 63 | It's used during the writing (updating) of a file already in a zip 64 | file; by default: > 65 | let g:zip_zipcmd= "zip" 66 | < 67 | *g:zip_extractcmd* 68 | This option specifies the program (and any options needed) used to 69 | extract a file from a zip archive. By default, > 70 | let g:zip_extractcmd= g:zip_unzipcmd 71 | < 72 | PREVENTING LOADING~ 73 | 74 | If for some reason you do not wish to use vim to examine zipped files, 75 | you may put the following two variables into your <.vimrc> to prevent 76 | the zip plugin from loading: > 77 | 78 | let g:loaded_zipPlugin= 1 79 | let g:loaded_zip = 1 80 | < 81 | 82 | ============================================================================== 83 | 3. Additional Extensions *zip-extension* 84 | 85 | Apparently there are a number of archivers which generate zip files that 86 | don't use the .zip extension (.jar, .xpi, etc). To handle such files, 87 | place a line in your <.vimrc> file: > 88 | 89 | au BufReadCmd *.jar,*.xpi call zip#Browse(expand("")) 90 | < 91 | One can simply extend this line to accommodate additional extensions that 92 | should be treated as zip files. 93 | 94 | Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc. 95 | Currently (11/30/15) it holds: > 96 | 97 | let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip, 98 | \ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm, 99 | \ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm, 100 | \ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub' 101 | 102 | ============================================================================== 103 | 4. History *zip-history* {{{1 104 | v28 Oct 08, 2014 * changed the sanity checks for executables to reflect 105 | the command actually to be attempted in zip#Read() 106 | and zip#Write() 107 | * added the extraction of a file capability 108 | Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list 109 | Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and 110 | sorted the suffices. 111 | v27 Jul 02, 2013 * sanity check: zipfile must have "PK" as its first 112 | two bytes. 113 | * modified to allow zipfile: entries in quickfix lists 114 | v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that 115 | are synonyms for .zip 116 | v25 Jun 27, 2011 * using keepj with unzip -Z 117 | (consistent with the -p variant) 118 | * (Ben Staniford) now uses 119 | has("win32unix") && executable("cygpath") 120 | before converting to cygwin-style paths 121 | v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames 122 | fnameescape'd as well as shellquote'd 123 | * (Motoya Kurotsu) inserted keepj before 0d to protect 124 | jump list 125 | v17 May 09, 2008 * arno caught a security bug 126 | v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq 127 | v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem 128 | when editing alternate file to bring up a zipfile 129 | v10 May 02, 2006 * now using "redraw then echo" to show messages, instead 130 | of "echo and prompt user" 131 | * g:zip_shq provided to allow for quoting control for the 132 | command being passed via :r! ... commands. 133 | v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message 134 | due to "Pattern not found: ^.*\%0c"; this was caused by 135 | stridx finding a Name... at the beginning of the line; 136 | zip.vim tried 4,$s/^.*\%0c//, but that doesn't work. 137 | Fixed. 138 | v7 Mar 22, 2006 * escaped some characters that can cause filename handling 139 | problems. 140 | v6 Dec 21, 2005 * writing to files not in directories caused problems - 141 | fixed (pointed out by Christian Robinson) 142 | v5 Nov 22, 2005 * report option workaround installed 143 | v3 Oct 18, 2005 * used instead of in autocmds 144 | v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt) 145 | * began testing under Windows; works thus far 146 | * filetype detection fixed 147 | Nov 03, 2005 * handles writing zipfiles across a network using 148 | netrw#NetWrite() 149 | v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing 150 | 151 | ============================================================================== 152 | vim:tw=78:ts=8:noet:ft=help:fdm=marker 153 | -------------------------------------------------------------------------------- /doc/remote_plugin.jax: -------------------------------------------------------------------------------- 1 | *remote_plugin.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim support for remote plugins *remote-plugin* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | ============================================================================== 12 | 1. Introduction *remote-plugin-intro* 13 | 14 | Extensibility is a primary goal of Nvim. Any programming language may be used 15 | to extend Nvim without changes to Nvim itself. This is achieved with remote 16 | plugins, coprocesses that have a direct communication channel (via |RPC|) with 17 | the Nvim process. 18 | 19 | Even though these plugins run in separate processes they can call, be called, 20 | and receive events just as if the plugin's code were executed in the main 21 | process. 22 | 23 | ============================================================================== 24 | 2. Plugin hosts *remote-plugin-hosts* 25 | 26 | While plugins can be implemented as arbitrary programs that communicate 27 | directly with the high-level Nvim API and are called via |rpcrequest()| and 28 | |rpcnotify()|, that is not the best approach. Instead, developers should first 29 | check whether a plugin host is available for their chosen programming language. 30 | 31 | Plugin hosts are programs that provide a high-level environment for plugins, 32 | taking care of most boilerplate involved in defining commands, autocmds, and 33 | functions that are implemented over |RPC| connections. Hosts are loaded only 34 | when one of their registered plugins require it, keeping Nvim's startup as 35 | fast as possible, even if many plugins/hosts are installed. 36 | 37 | ============================================================================== 38 | 3. Example *remote-plugin-example* 39 | 40 | The best way to learn about remote plugins is with an example, so let's see 41 | what a Python plugin looks like. This plugin exports a command, a function, and 42 | an autocmd. The plugin is called 'Limit', and all it does is limit the number 43 | of requests made to it. Here's the plugin source code: 44 | > 45 | import pynvim 46 | 47 | @pynvim.plugin 48 | class Limit(object): 49 | def __init__(self, vim): 50 | self.vim = vim 51 | self.calls = 0 52 | 53 | @pynvim.command('Cmd', range='', nargs='*', sync=True) 54 | def command_handler(self, args, range): 55 | self._increment_calls() 56 | self.vim.current.line = ( 57 | 'Command: Called %d times, args: %s, range: %s' % (self.calls, 58 | args, 59 | range)) 60 | 61 | @pynvim.autocmd('BufEnter', pattern='*.py', eval='expand("")', 62 | sync=True) 63 | def autocmd_handler(self, filename): 64 | self._increment_calls() 65 | self.vim.current.line = ( 66 | 'Autocmd: Called %s times, file: %s' % (self.calls, filename)) 67 | 68 | @pynvim.function('Func') 69 | def function_handler(self, args): 70 | self._increment_calls() 71 | self.vim.current.line = ( 72 | 'Function: Called %d times, args: %s' % (self.calls, args)) 73 | 74 | def _increment_calls(self): 75 | if self.calls == 5: 76 | raise Exception('Too many calls!') 77 | self.calls += 1 78 | < 79 | 80 | As can be seen, the plugin is implemented using idiomatic Python (classes, 81 | methods, and decorators). The translation between these language-specific 82 | idioms to Vimscript occurs while the plugin manifest is being generated (see 83 | the next section). 84 | 85 | Notice that the exported command and autocmd are defined with the "sync" flag, 86 | which affects how Nvim calls the plugin: with "sync" the |rpcrequest()| 87 | function is used, which will block Nvim until the handler function returns a 88 | value. Without the "sync" flag, the call is made using a fire and forget 89 | approach with |rpcnotify()|, meaning return values or exceptions raised in the 90 | handler function are ignored. 91 | 92 | To test the above plugin, it must be saved in "rplugin/python" in a 93 | 'runtimepath' directory (~/.config/nvim/rplugin/python/limit.py for example). 94 | Then, the remote plugin manifest must be generated with 95 | |:UpdateRemotePlugins|. 96 | 97 | ============================================================================== 98 | 4. Remote plugin manifest *remote-plugin-manifest* 99 | *:UpdateRemotePlugins* 100 | 101 | Just installing remote plugins to "rplugin/{host}" isn't enough for them to be 102 | automatically loaded when required. You must execute |:UpdateRemotePlugins| 103 | every time a remote plugin is installed, updated, or deleted. 104 | 105 | |:UpdateRemotePlugins| generates the remote plugin manifest, a special 106 | Vimscript file containing declarations for all Vimscript entities 107 | (commands/autocommands/functions) defined by all remote plugins, with each 108 | entity associated with the host and plugin path. 109 | 110 | Manifest declarations are just calls to the `remote#host#RegisterPlugin` 111 | function, which takes care of bootstrapping the host as soon as the declared 112 | command, autocommand, or function is used for the first time. 113 | 114 | The manifest generation step is necessary to keep Nvim's startup fast in 115 | situations where a user has remote plugins with different hosts. For example, 116 | say a user has three plugins, for Python, Java and .NET hosts respectively. If 117 | we were to load all three plugins at startup, then three language runtimes 118 | would also be spawned, which could take seconds! 119 | 120 | With the manifest, each host will only be loaded when required. Continuing with 121 | the example, say the Java plugin is a semantic completion engine for Java code. 122 | If it defines the autocommand "BufEnter *.java", then the Java host is spawned 123 | only when Nvim loads a buffer matching "*.java". 124 | 125 | If the explicit call to |:UpdateRemotePlugins| seems inconvenient, try to see 126 | it like this: It's a way to provide IDE capabilities in Nvim while still 127 | keeping it fast and lightweight for general use. It's also analogous to the 128 | |:helptags| command. 129 | 130 | *$NVIM_RPLUGIN_MANIFEST* 131 | Unless $NVIM_RPLUGIN_MANIFEST is set the manifest will be written to a file 132 | named `rplugin.vim` at: 133 | 134 | Unix ~ 135 | $XDG_DATA_HOME/nvim/ or ~/.local/share/nvim/ 136 | 137 | Windows ~ 138 | $LOCALAPPDATA/nvim/ or ~/AppData/Local/nvim/ 139 | 140 | ============================================================================== 141 | vim:tw=78:ts=8:noet:ft=help:norl: 142 | -------------------------------------------------------------------------------- /doc/remote_plugin.txt: -------------------------------------------------------------------------------- 1 | *remote_plugin.txt* Nvim 2 | 3 | 4 | NVIM REFERENCE MANUAL by Thiago de Arruda 5 | 6 | 7 | Nvim support for remote plugins *remote-plugin* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | ============================================================================== 12 | 1. Introduction *remote-plugin-intro* 13 | 14 | Extensibility is a primary goal of Nvim. Any programming language may be used 15 | to extend Nvim without changes to Nvim itself. This is achieved with remote 16 | plugins, coprocesses that have a direct communication channel (via |RPC|) with 17 | the Nvim process. 18 | 19 | Even though these plugins run in separate processes they can call, be called, 20 | and receive events just as if the plugin's code were executed in the main 21 | process. 22 | 23 | ============================================================================== 24 | 2. Plugin hosts *remote-plugin-hosts* 25 | 26 | While plugins can be implemented as arbitrary programs that communicate 27 | directly with the high-level Nvim API and are called via |rpcrequest()| and 28 | |rpcnotify()|, that is not the best approach. Instead, developers should first 29 | check whether a plugin host is available for their chosen programming language. 30 | 31 | Plugin hosts are programs that provide a high-level environment for plugins, 32 | taking care of most boilerplate involved in defining commands, autocmds, and 33 | functions that are implemented over |RPC| connections. Hosts are loaded only 34 | when one of their registered plugins require it, keeping Nvim's startup as 35 | fast as possible, even if many plugins/hosts are installed. 36 | 37 | ============================================================================== 38 | 3. Example *remote-plugin-example* 39 | 40 | The best way to learn about remote plugins is with an example, so let's see 41 | what a Python plugin looks like. This plugin exports a command, a function, and 42 | an autocmd. The plugin is called 'Limit', and all it does is limit the number 43 | of requests made to it. Here's the plugin source code: 44 | > 45 | import pynvim 46 | 47 | @pynvim.plugin 48 | class Limit(object): 49 | def __init__(self, vim): 50 | self.vim = vim 51 | self.calls = 0 52 | 53 | @pynvim.command('Cmd', range='', nargs='*', sync=True) 54 | def command_handler(self, args, range): 55 | self._increment_calls() 56 | self.vim.current.line = ( 57 | 'Command: Called %d times, args: %s, range: %s' % (self.calls, 58 | args, 59 | range)) 60 | 61 | @pynvim.autocmd('BufEnter', pattern='*.py', eval='expand("")', 62 | sync=True) 63 | def autocmd_handler(self, filename): 64 | self._increment_calls() 65 | self.vim.current.line = ( 66 | 'Autocmd: Called %s times, file: %s' % (self.calls, filename)) 67 | 68 | @pynvim.function('Func') 69 | def function_handler(self, args): 70 | self._increment_calls() 71 | self.vim.current.line = ( 72 | 'Function: Called %d times, args: %s' % (self.calls, args)) 73 | 74 | def _increment_calls(self): 75 | if self.calls == 5: 76 | raise Exception('Too many calls!') 77 | self.calls += 1 78 | < 79 | 80 | As can be seen, the plugin is implemented using idiomatic Python (classes, 81 | methods, and decorators). The translation between these language-specific 82 | idioms to Vimscript occurs while the plugin manifest is being generated (see 83 | the next section). 84 | 85 | Notice that the exported command and autocmd are defined with the "sync" flag, 86 | which affects how Nvim calls the plugin: with "sync" the |rpcrequest()| 87 | function is used, which will block Nvim until the handler function returns a 88 | value. Without the "sync" flag, the call is made using a fire and forget 89 | approach with |rpcnotify()|, meaning return values or exceptions raised in the 90 | handler function are ignored. 91 | 92 | To test the above plugin, it must be saved in "rplugin/python" in a 93 | 'runtimepath' directory (~/.config/nvim/rplugin/python/limit.py for example). 94 | Then, the remote plugin manifest must be generated with 95 | |:UpdateRemotePlugins|. 96 | 97 | ============================================================================== 98 | 4. Remote plugin manifest *remote-plugin-manifest* 99 | *:UpdateRemotePlugins* 100 | 101 | Just installing remote plugins to "rplugin/{host}" isn't enough for them to be 102 | automatically loaded when required. You must execute |:UpdateRemotePlugins| 103 | every time a remote plugin is installed, updated, or deleted. 104 | 105 | |:UpdateRemotePlugins| generates the remote plugin manifest, a special 106 | Vimscript file containing declarations for all Vimscript entities 107 | (commands/autocommands/functions) defined by all remote plugins, with each 108 | entity associated with the host and plugin path. 109 | 110 | Manifest declarations are just calls to the `remote#host#RegisterPlugin` 111 | function, which takes care of bootstrapping the host as soon as the declared 112 | command, autocommand, or function is used for the first time. 113 | 114 | The manifest generation step is necessary to keep Nvim's startup fast in 115 | situations where a user has remote plugins with different hosts. For example, 116 | say a user has three plugins, for Python, Java and .NET hosts respectively. If 117 | we were to load all three plugins at startup, then three language runtimes 118 | would also be spawned, which could take seconds! 119 | 120 | With the manifest, each host will only be loaded when required. Continuing with 121 | the example, say the Java plugin is a semantic completion engine for Java code. 122 | If it defines the autocommand "BufEnter *.java", then the Java host is spawned 123 | only when Nvim loads a buffer matching "*.java". 124 | 125 | If the explicit call to |:UpdateRemotePlugins| seems inconvenient, try to see 126 | it like this: It's a way to provide IDE capabilities in Nvim while still 127 | keeping it fast and lightweight for general use. It's also analogous to the 128 | |:helptags| command. 129 | 130 | *$NVIM_RPLUGIN_MANIFEST* 131 | Unless $NVIM_RPLUGIN_MANIFEST is set the manifest will be written to a file 132 | named `rplugin.vim` at: 133 | 134 | Unix ~ 135 | $XDG_DATA_HOME/nvim/ or ~/.local/share/nvim/ 136 | 137 | Windows ~ 138 | $LOCALAPPDATA/nvim/ or ~/AppData/Local/nvim/ 139 | 140 | ============================================================================== 141 | vim:tw=78:ts=8:noet:ft=help:norl: 142 | -------------------------------------------------------------------------------- /doc/rileft.jax: -------------------------------------------------------------------------------- 1 | *rileft.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Avner Lottem 5 | updated by Nadim Shaikli 6 | 7 | 8 | Right to Left display mode for Vim *rileft* 9 | 10 | 11 | These functions were originally created by Avner Lottem: 12 | E-mail: alottem@iil.intel.com 13 | Phone: +972-4-8307322 14 | 15 | Introduction 16 | ------------ 17 | Some languages such as Arabic, Farsi, Hebrew (among others) require the 18 | ability to display their text from right-to-left. Files in those languages 19 | are stored conventionally and the right-to-left requirement is only a 20 | function of the display engine (per the Unicode specification). In 21 | right-to-left oriented files the characters appear on the screen from 22 | right to left. 23 | 24 | Bidirectionality (or bidi for short) is what Unicode offers as a full 25 | solution to these languages. Bidi offers the user the ability to view 26 | both right-to-left as well as left-to-right text properly at the same time 27 | within the same window. Vim currently, due to simplicity, does not offer 28 | bidi and is merely opting to present a functional means to display/enter/use 29 | right-to-left languages. An older hybrid solution in which direction is 30 | encoded for every character (or group of characters) are not supported either 31 | as this kind of support is out of the scope of a simple addition to an 32 | existing editor (and it's not sanctioned by Unicode either). 33 | 34 | 35 | Highlights 36 | ---------- 37 | o Editing left-to-right files as in the original Vim, no change. 38 | 39 | o Viewing and editing files in right-to-left windows. File orientation 40 | is per window, so it is possible to view the same file in right-to-left 41 | and left-to-right modes, simultaneously. (Useful for editing mixed files 42 | in which both right-to-left and left-to-right text exist). 43 | 44 | o Compatibility to the original Vim. Almost all features work in 45 | right-to-left mode (see Bugs below). 46 | 47 | o Backing from reverse insert mode to the correct place in the file 48 | (if possible). 49 | 50 | o No special terminal with right-to-left capabilities is required. The 51 | right-to-left changes are completely hardware independent. 52 | 53 | o Many languages use and require right-to-left support. These languages 54 | can quite easily be supported given the inclusion of their required 55 | keyboard mappings and some possible minor code change. Some of the 56 | current supported languages include - |arabic.txt| and |hebrew.txt|. 57 | 58 | 59 | Of Interest... 60 | -------------- 61 | 62 | o Invocations 63 | ----------- 64 | + 'rightleft' ('rl') sets window orientation to right-to-left. 65 | + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded languages, 66 | allows one to remove a composing character which gets superimposed 67 | on those that proceeded them (some languages require this). 68 | + 'rightleftcmd' ('rlc') sets the command-line within certain modes 69 | (such as search) to be utilized in right-to-left orientation as well. 70 | 71 | o Typing backwards *ins-reverse* 72 | ---------------- 73 | In lieu of using full-fledged the 'rightleft' option, one can opt for 74 | reverse insertion. When the 'revins' (reverse insert) option is set, 75 | inserting happens backwards. This can be used to type right-to-left 76 | text. When inserting characters the cursor is not moved and the text 77 | moves rightwards. A deletes the character under the cursor. 78 | CTRL-W and CTRL-U also work in the opposite direction. , CTRL-W 79 | and CTRL-U do not stop at the start of insert or end of line, no matter 80 | how the 'backspace' option is set. 81 | 82 | There is no reverse replace mode (yet). 83 | 84 | If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown 85 | in the status line when reverse Insert mode is active. 86 | 87 | o Pasting when in a rightleft window 88 | ---------------------------------- 89 | When cutting text with the mouse and pasting it in a rightleft window 90 | the text will be reversed, because the characters come from the cut buffer 91 | from the left to the right, while inserted in the file from the right to 92 | the left. In order to avoid it, toggle 'revins' before pasting. 93 | 94 | 95 | Bugs 96 | ---- 97 | o Does not handle CTRL-A and CTRL-X commands (add and subtract) correctly 98 | when in rightleft window. 99 | 100 | o Does not support reverse insert and rightleft modes on the command-line. 101 | However, functionality of the editor is not reduced, because it is 102 | possible to enter mappings, abbreviations and searches typed from the 103 | left to the right on the command-line. 104 | 105 | o Somewhat slower in right-to-left mode, because right-to-left motion is 106 | emulated inside Vim, not by the controlling terminal. 107 | 108 | o When both 'rightleft' and 'revins' are on: 'textwidth' does not work. 109 | Lines do not wrap at all; you just get a single, long line. 110 | 111 | o There is no full bidirectionality (bidi) support. 112 | 113 | 114 | vim:tw=78:ts=8:noet:ft=help:norl: 115 | -------------------------------------------------------------------------------- /doc/rileft.txt: -------------------------------------------------------------------------------- 1 | *rileft.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Avner Lottem 5 | updated by Nadim Shaikli 6 | 7 | 8 | Right to Left display mode for Vim *rileft* 9 | 10 | 11 | These functions were originally created by Avner Lottem: 12 | E-mail: alottem@iil.intel.com 13 | Phone: +972-4-8307322 14 | 15 | Introduction 16 | ------------ 17 | Some languages such as Arabic, Farsi, Hebrew (among others) require the 18 | ability to display their text from right-to-left. Files in those languages 19 | are stored conventionally and the right-to-left requirement is only a 20 | function of the display engine (per the Unicode specification). In 21 | right-to-left oriented files the characters appear on the screen from 22 | right to left. 23 | 24 | Bidirectionality (or bidi for short) is what Unicode offers as a full 25 | solution to these languages. Bidi offers the user the ability to view 26 | both right-to-left as well as left-to-right text properly at the same time 27 | within the same window. Vim currently, due to simplicity, does not offer 28 | bidi and is merely opting to present a functional means to display/enter/use 29 | right-to-left languages. An older hybrid solution in which direction is 30 | encoded for every character (or group of characters) are not supported either 31 | as this kind of support is out of the scope of a simple addition to an 32 | existing editor (and it's not sanctioned by Unicode either). 33 | 34 | 35 | Highlights 36 | ---------- 37 | o Editing left-to-right files as in the original Vim, no change. 38 | 39 | o Viewing and editing files in right-to-left windows. File orientation 40 | is per window, so it is possible to view the same file in right-to-left 41 | and left-to-right modes, simultaneously. (Useful for editing mixed files 42 | in which both right-to-left and left-to-right text exist). 43 | 44 | o Compatibility to the original Vim. Almost all features work in 45 | right-to-left mode (see Bugs below). 46 | 47 | o Backing from reverse insert mode to the correct place in the file 48 | (if possible). 49 | 50 | o No special terminal with right-to-left capabilities is required. The 51 | right-to-left changes are completely hardware independent. 52 | 53 | o Many languages use and require right-to-left support. These languages 54 | can quite easily be supported given the inclusion of their required 55 | keyboard mappings and some possible minor code change. Some of the 56 | current supported languages include - |arabic.txt| and |hebrew.txt|. 57 | 58 | 59 | Of Interest... 60 | -------------- 61 | 62 | o Invocations 63 | ----------- 64 | + 'rightleft' ('rl') sets window orientation to right-to-left. 65 | + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded languages, 66 | allows one to remove a composing character which gets superimposed 67 | on those that proceeded them (some languages require this). 68 | + 'rightleftcmd' ('rlc') sets the command-line within certain modes 69 | (such as search) to be utilized in right-to-left orientation as well. 70 | 71 | o Typing backwards *ins-reverse* 72 | ---------------- 73 | In lieu of using full-fledged the 'rightleft' option, one can opt for 74 | reverse insertion. When the 'revins' (reverse insert) option is set, 75 | inserting happens backwards. This can be used to type right-to-left 76 | text. When inserting characters the cursor is not moved and the text 77 | moves rightwards. A deletes the character under the cursor. 78 | CTRL-W and CTRL-U also work in the opposite direction. , CTRL-W 79 | and CTRL-U do not stop at the start of insert or end of line, no matter 80 | how the 'backspace' option is set. 81 | 82 | There is no reverse replace mode (yet). 83 | 84 | If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown 85 | in the status line when reverse Insert mode is active. 86 | 87 | o Pasting when in a rightleft window 88 | ---------------------------------- 89 | When cutting text with the mouse and pasting it in a rightleft window 90 | the text will be reversed, because the characters come from the cut buffer 91 | from the left to the right, while inserted in the file from the right to 92 | the left. In order to avoid it, toggle 'revins' before pasting. 93 | 94 | 95 | Bugs 96 | ---- 97 | o Does not handle CTRL-A and CTRL-X commands (add and subtract) correctly 98 | when in rightleft window. 99 | 100 | o Does not support reverse insert and rightleft modes on the command-line. 101 | However, functionality of the editor is not reduced, because it is 102 | possible to enter mappings, abbreviations and searches typed from the 103 | left to the right on the command-line. 104 | 105 | o Somewhat slower in right-to-left mode, because right-to-left motion is 106 | emulated inside Vim, not by the controlling terminal. 107 | 108 | o When both 'rightleft' and 'revins' are on: 'textwidth' does not work. 109 | Lines do not wrap at all; you just get a single, long line. 110 | 111 | o There is no full bidirectionality (bidi) support. 112 | 113 | 114 | vim:tw=78:ts=8:noet:ft=help:norl: 115 | -------------------------------------------------------------------------------- /doc/russian.jax: -------------------------------------------------------------------------------- 1 | *russian.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Vassily Ragosin 5 | 6 | 7 | Russian language localization and support in Vim *russian* *Russian* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | =============================================================================== 12 | 1. Introduction *russian-intro* 13 | 14 | Russian language is supported perfectly well in Vim. You can type and view 15 | Russian text just as any other, without the need to tweak the settings. 16 | 17 | =============================================================================== 18 | 2. Russian keymaps *russian-keymap* 19 | 20 | To switch between languages you can use your system native keyboard switcher, 21 | or use one of the Russian keymaps, included in the Vim distribution. For 22 | example, 23 | > 24 | :set keymap=russian-jcukenwin 25 | < 26 | In the latter case, you can switch between languages even if you do not have 27 | system Russian keyboard or independently from a system-wide keyboard settings. 28 | See 'keymap'. You can also map a key to switch between keyboards, if you 29 | choose the latter option. See |:map|. 30 | 31 | For your convenience, to avoid switching between keyboards, when you need to 32 | enter Normal mode command, you can also set 'langmap' option: 33 | > 34 | :set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ, 35 | фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz 36 | 37 | This is in utf-8, you cannot read this if your 'encoding' is not utf-8. 38 | You have to type this command in one line, it is wrapped for the sake of 39 | readability. 40 | 41 | =============================================================================== 42 | 3. Localization *russian-l18n* 43 | 44 | If you wish to use messages, help files, menus and other items translated to 45 | Russian, you will need to install the RuVim Language Pack, available in 46 | different codepages from 47 | 48 | http://www.sourceforge.net/projects/ruvim/ 49 | 50 | Make sure that your Vim is at least 6.2.506 and use ruvim 0.5 or later for 51 | automatic installs. Vim also needs to be compiled with |+gettext| feature for 52 | user interface items translations to work. 53 | 54 | After downloading an archive from RuVim project, unpack it into your 55 | $VIMRUNTIME directory. We recommend using UTF-8 archive. 56 | 57 | In order to use the Russian documentation, make sure you have set the 58 | 'helplang' option to "ru". 59 | 60 | =============================================================================== 61 | 4. Known issues *russian-issues* 62 | 63 | -- If you are using Russian message translations in Win32 console, then 64 | you may see the output produced by "vim --help", "vim --version" commands 65 | and Win32 console window title appearing in a wrong codepage. This problem 66 | is related to a bug in GNU gettext library and may be fixed in the future 67 | releases of gettext. 68 | 69 | =============================================================================== 70 | vim:tw=78:ts=8:noet:ft=help:norl: 71 | -------------------------------------------------------------------------------- /doc/russian.txt: -------------------------------------------------------------------------------- 1 | *russian.txt* Nvim 2 | 3 | 4 | VIM REFERENCE MANUAL by Vassily Ragosin 5 | 6 | 7 | Russian language localization and support in Vim *russian* *Russian* 8 | 9 | Type |gO| to see the table of contents. 10 | 11 | =============================================================================== 12 | 1. Introduction *russian-intro* 13 | 14 | Russian language is supported perfectly well in Vim. You can type and view 15 | Russian text just as any other, without the need to tweak the settings. 16 | 17 | =============================================================================== 18 | 2. Russian keymaps *russian-keymap* 19 | 20 | To switch between languages you can use your system native keyboard switcher, 21 | or use one of the Russian keymaps, included in the Vim distribution. For 22 | example, 23 | > 24 | :set keymap=russian-jcukenwin 25 | < 26 | In the latter case, you can switch between languages even if you do not have 27 | system Russian keyboard or independently from a system-wide keyboard settings. 28 | See 'keymap'. You can also map a key to switch between keyboards, if you 29 | choose the latter option. See |:map|. 30 | 31 | For your convenience, to avoid switching between keyboards, when you need to 32 | enter Normal mode command, you can also set 'langmap' option: 33 | > 34 | :set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ, 35 | фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz 36 | 37 | This is in utf-8, you cannot read this if your 'encoding' is not utf-8. 38 | You have to type this command in one line, it is wrapped for the sake of 39 | readability. 40 | 41 | =============================================================================== 42 | 3. Localization *russian-l18n* 43 | 44 | If you wish to use messages, help files, menus and other items translated to 45 | Russian, you will need to install the RuVim Language Pack, available in 46 | different codepages from 47 | 48 | http://www.sourceforge.net/projects/ruvim/ 49 | 50 | Make sure that your Vim is at least 6.2.506 and use ruvim 0.5 or later for 51 | automatic installs. Vim also needs to be compiled with |+gettext| feature for 52 | user interface items translations to work. 53 | 54 | After downloading an archive from RuVim project, unpack it into your 55 | $VIMRUNTIME directory. We recommend using UTF-8 archive. 56 | 57 | In order to use the Russian documentation, make sure you have set the 58 | 'helplang' option to "ru". 59 | 60 | =============================================================================== 61 | 4. Known issues *russian-issues* 62 | 63 | -- If you are using Russian message translations in Win32 console, then 64 | you may see the output produced by "vim --help", "vim --version" commands 65 | and Win32 console window title appearing in a wrong codepage. This problem 66 | is related to a bug in GNU gettext library and may be fixed in the future 67 | releases of gettext. 68 | 69 | =============================================================================== 70 | vim:tw=78:ts=8:noet:ft=help:norl: 71 | -------------------------------------------------------------------------------- /doc/spell.jax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vim-jp/nvimdoc-ja/a590737064a863a8ce5620e556ce21aba5e68287/doc/spell.jax -------------------------------------------------------------------------------- /doc/spell.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vim-jp/nvimdoc-ja/a590737064a863a8ce5620e556ce21aba5e68287/doc/spell.txt -------------------------------------------------------------------------------- /doc/usr_01.jax: -------------------------------------------------------------------------------- 1 | *usr_01.txt* Nvim 2 | 3 | VIM USER MANUAL - by Bram Moolenaar 4 | 5 | About the manuals 6 | 7 | 8 | This chapter introduces the manuals available with Vim. Read this to know the 9 | conditions under which the commands are explained. 10 | 11 | |01.1| Two manuals 12 | |01.2| Vim installed 13 | |01.3| Using the Vim tutor 14 | |01.4| Copyright 15 | 16 | Next chapter: |usr_02.txt| The first steps in Vim 17 | Table of contents: |usr_toc.txt| 18 | 19 | ============================================================================== 20 | *01.1* Two manuals 21 | 22 | The Vim documentation consists of two parts: 23 | 24 | 1. The User manual 25 | Task oriented explanations, from simple to complex. Reads from start to 26 | end like a book. 27 | 28 | 2. The Reference manual 29 | Precise description of how everything in Vim works. 30 | 31 | The notation used in these manuals is explained here: |notation| 32 | 33 | 34 | JUMPING AROUND 35 | 36 | The text contains hyperlinks between the two parts, allowing you to quickly 37 | jump between the description of an editing task and a precise explanation of 38 | the commands and options used for it. Use these two commands: 39 | 40 | Press CTRL-] to jump to a subject under the cursor. 41 | Press CTRL-O to jump back (repeat to go further back). 42 | 43 | Many links are in vertical bars, like this: |bars|. The bars themselves may 44 | be hidden or invisible, see below. An option name, like 'number', a command 45 | in double quotes like ":write" and any other word can also be used as a link. 46 | Try it out: Move the cursor to CTRL-] and press CTRL-] on it. 47 | 48 | Other subjects can be found with the ":help" command, see |help.txt|. 49 | 50 | The bars and stars are usually hidden with the |conceal| feature. They also 51 | use |hl-Ignore|, using the same color for the text as the background. You can 52 | make them visible with: > 53 | :set conceallevel=0 54 | :hi link HelpBar Normal 55 | :hi link HelpStar Normal 56 | 57 | ============================================================================== 58 | *01.2* Vim installed *setup-vimrc_example* 59 | 60 | To create an empty vimrc: > 61 | 62 | :call mkdir(stdpath('config'),'p') 63 | :exe 'edit' stdpath('config').'/init.vim' 64 | :write 65 | 66 | For more info see |vimrc|. 67 | 68 | ============================================================================== 69 | *01.3* Using the Vim tutor *tutor* *vimtutor* 70 | 71 | Instead of reading the text (boring!) you can use :Tutor to learn your first 72 | Vim commands. This is a 30 minute tutorial that teaches the most basic Vim 73 | functionality hands-on. 74 | 75 | To start the tutorial, execute > 76 | 77 | :Tutor 78 | < 79 | from within nvim. The tutorial will lead you from that point. Have fun! 80 | 81 | ============================================================================== 82 | *01.4* Copyright *manual-copyright* 83 | 84 | The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram 85 | Moolenaar. This material may be distributed only subject to the terms and 86 | conditions set forth in the Open Publication License, v1.0 or later. The 87 | latest version is presently available at: 88 | http://www.opencontent.org/openpub/ 89 | 90 | People who contribute to the manuals must agree with the above copyright 91 | notice. 92 | *frombook* 93 | Parts of the user manual come from the book "Vi IMproved - Vim" by Steve 94 | Oualline (published by New Riders Publishing, ISBN: 0735710015). The Open 95 | Publication License applies to this book. Only selected parts are included 96 | and these have been modified (e.g., by removing the pictures, updating the 97 | text for Vim 6.0 and later, fixing mistakes). The omission of the |frombook| 98 | tag does not mean that the text does not come from the book. 99 | 100 | Many thanks to Steve Oualline and New Riders for creating this book and 101 | publishing it under the OPL! It has been a great help while writing the user 102 | manual. Not only by providing literal text, but also by setting the tone and 103 | style. 104 | 105 | If you make money through selling the manuals, you are strongly encouraged to 106 | donate part of the profit to help AIDS victims in Uganda. See |iccf|. 107 | 108 | ============================================================================== 109 | 110 | Next chapter: |usr_02.txt| The first steps in Vim 111 | 112 | Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: 113 | -------------------------------------------------------------------------------- /doc/usr_01.txt: -------------------------------------------------------------------------------- 1 | *usr_01.txt* Nvim 2 | 3 | VIM USER MANUAL - by Bram Moolenaar 4 | 5 | About the manuals 6 | 7 | 8 | This chapter introduces the manuals available with Vim. Read this to know the 9 | conditions under which the commands are explained. 10 | 11 | |01.1| Two manuals 12 | |01.2| Vim installed 13 | |01.3| Using the Vim tutor 14 | |01.4| Copyright 15 | 16 | Next chapter: |usr_02.txt| The first steps in Vim 17 | Table of contents: |usr_toc.txt| 18 | 19 | ============================================================================== 20 | *01.1* Two manuals 21 | 22 | The Vim documentation consists of two parts: 23 | 24 | 1. The User manual 25 | Task oriented explanations, from simple to complex. Reads from start to 26 | end like a book. 27 | 28 | 2. The Reference manual 29 | Precise description of how everything in Vim works. 30 | 31 | The notation used in these manuals is explained here: |notation| 32 | 33 | 34 | JUMPING AROUND 35 | 36 | The text contains hyperlinks between the two parts, allowing you to quickly 37 | jump between the description of an editing task and a precise explanation of 38 | the commands and options used for it. Use these two commands: 39 | 40 | Press CTRL-] to jump to a subject under the cursor. 41 | Press CTRL-O to jump back (repeat to go further back). 42 | 43 | Many links are in vertical bars, like this: |bars|. The bars themselves may 44 | be hidden or invisible, see below. An option name, like 'number', a command 45 | in double quotes like ":write" and any other word can also be used as a link. 46 | Try it out: Move the cursor to CTRL-] and press CTRL-] on it. 47 | 48 | Other subjects can be found with the ":help" command, see |help.txt|. 49 | 50 | The bars and stars are usually hidden with the |conceal| feature. They also 51 | use |hl-Ignore|, using the same color for the text as the background. You can 52 | make them visible with: > 53 | :set conceallevel=0 54 | :hi link HelpBar Normal 55 | :hi link HelpStar Normal 56 | 57 | ============================================================================== 58 | *01.2* Vim installed *setup-vimrc_example* 59 | 60 | To create an empty vimrc: > 61 | 62 | :call mkdir(stdpath('config'),'p') 63 | :exe 'edit' stdpath('config').'/init.vim' 64 | :write 65 | 66 | For more info see |vimrc|. 67 | 68 | ============================================================================== 69 | *01.3* Using the Vim tutor *tutor* *vimtutor* 70 | 71 | Instead of reading the text (boring!) you can use :Tutor to learn your first 72 | Vim commands. This is a 30 minute tutorial that teaches the most basic Vim 73 | functionality hands-on. 74 | 75 | To start the tutorial, execute > 76 | 77 | :Tutor 78 | < 79 | from within nvim. The tutorial will lead you from that point. Have fun! 80 | 81 | ============================================================================== 82 | *01.4* Copyright *manual-copyright* 83 | 84 | The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram 85 | Moolenaar. This material may be distributed only subject to the terms and 86 | conditions set forth in the Open Publication License, v1.0 or later. The 87 | latest version is presently available at: 88 | http://www.opencontent.org/openpub/ 89 | 90 | People who contribute to the manuals must agree with the above copyright 91 | notice. 92 | *frombook* 93 | Parts of the user manual come from the book "Vi IMproved - Vim" by Steve 94 | Oualline (published by New Riders Publishing, ISBN: 0735710015). The Open 95 | Publication License applies to this book. Only selected parts are included 96 | and these have been modified (e.g., by removing the pictures, updating the 97 | text for Vim 6.0 and later, fixing mistakes). The omission of the |frombook| 98 | tag does not mean that the text does not come from the book. 99 | 100 | Many thanks to Steve Oualline and New Riders for creating this book and 101 | publishing it under the OPL! It has been a great help while writing the user 102 | manual. Not only by providing literal text, but also by setting the tone and 103 | style. 104 | 105 | If you make money through selling the manuals, you are strongly encouraged to 106 | donate part of the profit to help AIDS victims in Uganda. See |iccf|. 107 | 108 | ============================================================================== 109 | 110 | Next chapter: |usr_02.txt| The first steps in Vim 111 | 112 | Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: 113 | -------------------------------------------------------------------------------- /doc/usr_32.jax: -------------------------------------------------------------------------------- 1 | *usr_32.txt* Nvim 2 | 3 | VIM USER MANUAL - by Bram Moolenaar 4 | 5 | The undo tree 6 | 7 | 8 | Vim provides multi-level undo. If you undo a few changes and then make a new 9 | change you create a branch in the undo tree. This text is about moving 10 | through the branches. 11 | 12 | |32.1| Undo up to a file write 13 | |32.2| Numbering changes 14 | |32.3| Jumping around the tree 15 | |32.4| Time travelling 16 | 17 | Next chapter: |usr_40.txt| Make new commands 18 | Previous chapter: |usr_31.txt| Exploiting the GUI 19 | Table of contents: |usr_toc.txt| 20 | 21 | ============================================================================== 22 | *32.1* Undo up to a file write 23 | 24 | Sometimes you make several changes, and then discover you want to go back to 25 | when you have last written the file. You can do that with this command: > 26 | 27 | :earlier 1f 28 | 29 | The "f" stands for "file" here. 30 | 31 | You can repeat this command to go further back in the past. Or use a count 32 | different from 1 to go back faster. 33 | 34 | If you go back too far, go forward again with: > 35 | 36 | :later 1f 37 | 38 | Note that these commands really work in time sequence. This matters if you 39 | made changes after undoing some changes. It's explained in the next section. 40 | 41 | Also note that we are talking about text writes here. For writing the undo 42 | information in a file see |undo-persistence|. 43 | 44 | ============================================================================== 45 | *32.2* Numbering changes 46 | 47 | In section |02.5| we only discussed one line of undo/redo. But it is also 48 | possible to branch off. This happens when you undo a few changes and then 49 | make a new change. The new changes become a branch in the undo tree. 50 | 51 | Let's start with the text "one". The first change to make is to append 52 | " too". And then move to the first 'o' and change it into 'w'. We then have 53 | two changes, numbered 1 and 2, and three states of the text: 54 | 55 | one ~ 56 | | 57 | change 1 58 | | 59 | one too ~ 60 | | 61 | change 2 62 | | 63 | one two ~ 64 | 65 | If we now undo one change, back to "one too", and change "one" to "me" we 66 | create a branch in the undo tree: 67 | 68 | one ~ 69 | | 70 | change 1 71 | | 72 | one too ~ 73 | / \ 74 | change 2 change 3 75 | | | 76 | one two me too ~ 77 | 78 | You can now use the |u| command to undo. If you do this twice you get to 79 | "one". Use |CTRL-R| to redo, and you will go to "one too". One more |CTRL-R| 80 | takes you to "me too". Thus undo and redo go up and down in the tree, using 81 | the branch that was last used. 82 | 83 | What matters here is the order in which the changes are made. Undo and redo 84 | are not considered changes in this context. After each change you have a new 85 | state of the text. 86 | 87 | Note that only the changes are numbered, the text shown in the tree above has 88 | no identifier. They are mostly referred to by the number of the change above 89 | it. But sometimes by the number of one of the changes below it, especially 90 | when moving up in the tree, so that you know which change was just undone. 91 | 92 | ============================================================================== 93 | *32.3* Jumping around the tree 94 | 95 | So how do you get to "one two" now? You can use this command: > 96 | 97 | :undo 2 98 | 99 | The text is now "one two", you are below change 2. You can use the |:undo| 100 | command to jump to below any change in the tree. 101 | 102 | Now make another change: change "one" to "not": 103 | 104 | one ~ 105 | | 106 | change 1 107 | | 108 | one too ~ 109 | / \ 110 | change 2 change 3 111 | | | 112 | one two me too ~ 113 | | 114 | change 4 115 | | 116 | not two ~ 117 | 118 | Now you change your mind and want to go back to "me too". Use the |g-| 119 | command. This moves back in time. Thus it doesn't walk the tree upwards or 120 | downwards, but goes to the change made before. 121 | 122 | You can repeat |g-| and you will see the text change: 123 | me too ~ 124 | one two ~ 125 | one too ~ 126 | one ~ 127 | 128 | Use |g+| to move forward in time: 129 | one ~ 130 | one too ~ 131 | one two ~ 132 | me too ~ 133 | not two ~ 134 | 135 | Using |:undo| is useful if you know what change you want to jump to. |g-| and 136 | |g+| are useful if you don't know exactly what the change number is. 137 | 138 | You can type a count before |g-| and |g+| to repeat them. 139 | 140 | ============================================================================== 141 | *32.4* Time travelling 142 | 143 | When you have been working on text for a while the tree grows to become big. 144 | Then you may want to go to the text of some minutes ago. 145 | 146 | To see what branches there are in the undo tree use this command: > 147 | 148 | :undolist 149 | < number changes time ~ 150 | 3 2 16 seconds ago 151 | 4 3 5 seconds ago 152 | 153 | Here you can see the number of the leaves in each branch and when the change 154 | was made. Assuming we are below change 4, at "not two", you can go back ten 155 | seconds with this command: > 156 | 157 | :earlier 10s 158 | 159 | Depending on how much time you took for the changes you end up at a certain 160 | position in the tree. The |:earlier| command argument can be "m" for minutes, 161 | "h" for hours and "d" for days. To go all the way back use a big number: > 162 | 163 | :earlier 100d 164 | 165 | To travel forward in time again use the |:later| command: > 166 | 167 | :later 1m 168 | 169 | The arguments are "s", "m" and "h", just like with |:earlier|. 170 | 171 | If you want even more details, or want to manipulate the information, you can 172 | use the |undotree()| function. To see what it returns: > 173 | 174 | :echo undotree() 175 | 176 | ============================================================================== 177 | 178 | Next chapter: |usr_40.txt| Make new commands 179 | 180 | Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: 181 | -------------------------------------------------------------------------------- /doc/usr_32.txt: -------------------------------------------------------------------------------- 1 | *usr_32.txt* Nvim 2 | 3 | VIM USER MANUAL - by Bram Moolenaar 4 | 5 | The undo tree 6 | 7 | 8 | Vim provides multi-level undo. If you undo a few changes and then make a new 9 | change you create a branch in the undo tree. This text is about moving 10 | through the branches. 11 | 12 | |32.1| Undo up to a file write 13 | |32.2| Numbering changes 14 | |32.3| Jumping around the tree 15 | |32.4| Time travelling 16 | 17 | Next chapter: |usr_40.txt| Make new commands 18 | Previous chapter: |usr_31.txt| Exploiting the GUI 19 | Table of contents: |usr_toc.txt| 20 | 21 | ============================================================================== 22 | *32.1* Undo up to a file write 23 | 24 | Sometimes you make several changes, and then discover you want to go back to 25 | when you have last written the file. You can do that with this command: > 26 | 27 | :earlier 1f 28 | 29 | The "f" stands for "file" here. 30 | 31 | You can repeat this command to go further back in the past. Or use a count 32 | different from 1 to go back faster. 33 | 34 | If you go back too far, go forward again with: > 35 | 36 | :later 1f 37 | 38 | Note that these commands really work in time sequence. This matters if you 39 | made changes after undoing some changes. It's explained in the next section. 40 | 41 | Also note that we are talking about text writes here. For writing the undo 42 | information in a file see |undo-persistence|. 43 | 44 | ============================================================================== 45 | *32.2* Numbering changes 46 | 47 | In section |02.5| we only discussed one line of undo/redo. But it is also 48 | possible to branch off. This happens when you undo a few changes and then 49 | make a new change. The new changes become a branch in the undo tree. 50 | 51 | Let's start with the text "one". The first change to make is to append 52 | " too". And then move to the first 'o' and change it into 'w'. We then have 53 | two changes, numbered 1 and 2, and three states of the text: 54 | 55 | one ~ 56 | | 57 | change 1 58 | | 59 | one too ~ 60 | | 61 | change 2 62 | | 63 | one two ~ 64 | 65 | If we now undo one change, back to "one too", and change "one" to "me" we 66 | create a branch in the undo tree: 67 | 68 | one ~ 69 | | 70 | change 1 71 | | 72 | one too ~ 73 | / \ 74 | change 2 change 3 75 | | | 76 | one two me too ~ 77 | 78 | You can now use the |u| command to undo. If you do this twice you get to 79 | "one". Use |CTRL-R| to redo, and you will go to "one too". One more |CTRL-R| 80 | takes you to "me too". Thus undo and redo go up and down in the tree, using 81 | the branch that was last used. 82 | 83 | What matters here is the order in which the changes are made. Undo and redo 84 | are not considered changes in this context. After each change you have a new 85 | state of the text. 86 | 87 | Note that only the changes are numbered, the text shown in the tree above has 88 | no identifier. They are mostly referred to by the number of the change above 89 | it. But sometimes by the number of one of the changes below it, especially 90 | when moving up in the tree, so that you know which change was just undone. 91 | 92 | ============================================================================== 93 | *32.3* Jumping around the tree 94 | 95 | So how do you get to "one two" now? You can use this command: > 96 | 97 | :undo 2 98 | 99 | The text is now "one two", you are below change 2. You can use the |:undo| 100 | command to jump to below any change in the tree. 101 | 102 | Now make another change: change "one" to "not": 103 | 104 | one ~ 105 | | 106 | change 1 107 | | 108 | one too ~ 109 | / \ 110 | change 2 change 3 111 | | | 112 | one two me too ~ 113 | | 114 | change 4 115 | | 116 | not two ~ 117 | 118 | Now you change your mind and want to go back to "me too". Use the |g-| 119 | command. This moves back in time. Thus it doesn't walk the tree upwards or 120 | downwards, but goes to the change made before. 121 | 122 | You can repeat |g-| and you will see the text change: 123 | me too ~ 124 | one two ~ 125 | one too ~ 126 | one ~ 127 | 128 | Use |g+| to move forward in time: 129 | one ~ 130 | one too ~ 131 | one two ~ 132 | me too ~ 133 | not two ~ 134 | 135 | Using |:undo| is useful if you know what change you want to jump to. |g-| and 136 | |g+| are useful if you don't know exactly what the change number is. 137 | 138 | You can type a count before |g-| and |g+| to repeat them. 139 | 140 | ============================================================================== 141 | *32.4* Time travelling 142 | 143 | When you have been working on text for a while the tree grows to become big. 144 | Then you may want to go to the text of some minutes ago. 145 | 146 | To see what branches there are in the undo tree use this command: > 147 | 148 | :undolist 149 | < number changes time ~ 150 | 3 2 16 seconds ago 151 | 4 3 5 seconds ago 152 | 153 | Here you can see the number of the leaves in each branch and when the change 154 | was made. Assuming we are below change 4, at "not two", you can go back ten 155 | seconds with this command: > 156 | 157 | :earlier 10s 158 | 159 | Depending on how much time you took for the changes you end up at a certain 160 | position in the tree. The |:earlier| command argument can be "m" for minutes, 161 | "h" for hours and "d" for days. To go all the way back use a big number: > 162 | 163 | :earlier 100d 164 | 165 | To travel forward in time again use the |:later| command: > 166 | 167 | :later 1m 168 | 169 | The arguments are "s", "m" and "h", just like with |:earlier|. 170 | 171 | If you want even more details, or want to manipulate the information, you can 172 | use the |undotree()| function. To see what it returns: > 173 | 174 | :echo undotree() 175 | 176 | ============================================================================== 177 | 178 | Next chapter: |usr_40.txt| Make new commands 179 | 180 | Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: 181 | -------------------------------------------------------------------------------- /duplicate_jax.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for filename in $( ls -1 ); do 4 | fname=`basename ${filename} .txt` 5 | cp ${filename} ${fname}.jax 6 | done 7 | --------------------------------------------------------------------------------