diff options
author | Marvin Borner | 2019-03-05 01:09:01 +0100 |
---|---|---|
committer | Marvin Borner | 2019-03-05 01:09:01 +0100 |
commit | 55457187d18221e76bd12f0fb2cfab65c49b92fb (patch) | |
tree | 8db042d2d80710d54100c2709ad4332153ac848a /.local/share/nvim/plugged/nnn.vim/doc |
Initial commit
Diffstat (limited to '.local/share/nvim/plugged/nnn.vim/doc')
-rw-r--r-- | .local/share/nvim/plugged/nnn.vim/doc/nnn.txt | 201 | ||||
-rw-r--r-- | .local/share/nvim/plugged/nnn.vim/doc/tags | 21 |
2 files changed, 222 insertions, 0 deletions
diff --git a/.local/share/nvim/plugged/nnn.vim/doc/nnn.txt b/.local/share/nvim/plugged/nnn.vim/doc/nnn.txt new file mode 100644 index 0000000..ed5b1bf --- /dev/null +++ b/.local/share/nvim/plugged/nnn.vim/doc/nnn.txt @@ -0,0 +1,201 @@ +*nnn.vim* nnn file manager plugin for vim/neovim. +*nnn* +> + __ __ __ __ __ __ __ __ __ __ __ + /\ "-.\ \ /\ "-.\ \ /\ "-.\ \ /\ \ / / /\ \ /\ "-./ \ + \ \ \-. \ \ \ \-. \ \ \ \-. \ \ \ \'/ \ \ \ \ \ \-./\ \ + \ \_\\"\_\ \ \_\\"\_\ \ \_\\"\_\ \ \__| \ \_\ \ \_\ \ \_\ + \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ +< + +============================================================================= +CONTENTS *nnn-help* + + Introduction .......................... |nnn-intro| + Requirements .......................... |nnn-req| + Usage ................................. |nnn-usage| + Commands .............................. |nnn-commands| + Mappings .............................. |nnn-mappings| + Configurations ........................ |nnn-config| + Functions ............................. |nnn-func| + Miscellaneous ......................... |nnn-misc| + Credits ............................... |nnn-credits| + +============================================================================= +Introduction *nnn-intro* + +This plugins attempts to make nnn the file manager companion for vim. Use it +to create, remove, move files or to quickly select files in nnn and open them +in vim all without leaving vim. It achieves these but utilizing the built-in +terminal feature of vim and neovim. + +----------------------------------------------------------------------------- +Requirements *nnn-req* + +1. nnn (minimum version 2.2) +2. Neovim or Vim 8.1 with terminal support + +============================================================================= +Usage *nnn-usage* + +By running |:NnnPicker| or calling the |nnn#pick()| function, a new terminal +buffer opens running an nnn process in picker mode. + +Once you select (see https://github.com/jarun/nnn#selection) one or more +files and press enter, vim quits the nnn window and opens the first selected +file and add the remaining files to the arg list/buffer list. + +Pressing enter on a file in nnn will pick any earlier selection, pick +the file and exit nnn. + +To discard selection and exit, press ^G. + +----------------------------------------------------------------------------- +Commands *nnn-commands* + +:NnnPicker *:NnnPicker* + Opens an nnn window. +:Np *:Np* + Does the same as :NnnPicker. + +----------------------------------------------------------------------------- +Mappings *nnn-mappings* + +Defaults mappings. Can be disabled by setting |g:nnn#set_default_mappings| to +0. + +<leader>n + Runs |:NnnPicker|. + +----------------------------------------------------------------------------- +Configurations *nnn-config* + +g:nnn#set_default_mappings *g:nnn#set_default_mappings* + Default: 1 + Enable default mappings. + Examples: +> + " Disable default mappings + let g:nnn#set_default_mappings = 0 + + " Set your own + nnoremap <silent> <leader>nn :NnnPicker<CR> + + + " Or override + " Start nnn in the current file's directory + nnoremap <leader>n :NnnPicker '%:p:h'<CR> +< + +g:nnn#layout *g:nnn#layout* + Default: 'enew' + Display type for the nnn buffer. Default is |enew|, which + has a special behavior to act as a "split explorer" reusing + the current window and brings back the last buffer if + nothing is selected. + Examples: +> + " Opens the nnn window in a split + let g:nnn#layout = 'new' " or vnew, tabnew etc. + + " Or pass a dictionary with window size + let g:nnn#layout = { 'left': '~20%' } " or right, up, down +< + +g:nnn#action *g:nnn#action* + Default: {} + Additional key-binding set for the nnn buffer for opening + files in different ways. Nothing is set by default to not + override nnn's own key-bindings. + Examples: +> + let g:nnn#action = { + \ '<c-t>': 'tab split', + \ '<c-x>': 'split', + \ '<c-v>': 'vsplit', + \ '<c-o>': function('CopyLinestoRegister') } + + For example, when inside an nnn window, pressing <C-t> will + open the selected file in a tab, instead of the current + window. <C-x> will open in a split an so on. Meanwhile for + multi selected files will be loaded in the buffer list. + + And finally you can pass a FuncRef and the array of selected + lines will be passed to that function. + + function! CopyLinestoRegister(lines) + let joined_lines = join(a:lines, "\n") + if len(a:lines) > 1 + let joined_lines .= "\n" + endif + echom joined_lines + let @+ = joined_lines + endfunction +< + +g:nnn#command *g:nnn#command* + Default: 'nnn' + When you want to override the default nnn command and add + some extra flags. + Example you want to start nnn in light mode. +> + let g:nnn#command = 'nnn -l' + + " or pass some env variables + let g:nnn#command = 'NNN_RESTRICT_NAV_OPEN=1 nnn -l' +< + +g:nnn#replace_netrw *g:nnn#replace_netrw* + Default: 0 + Open nnn instead of netrw when opening a directory. + + +g:nnn#statusline *g:nnn#statusline* + Default: 1 + The nnn statusline. Set to 0 to disable. + + +----------------------------------------------------------------------------- +Functions *nnn-func* + +nnn#pick([{dir}][,{opts}]) *nnn#pick()* + Can be called with custom directory and additional options + such as opening file in splits or tabs. Basically a more + configurable version of |:NnnPicker| command. + + {dir} : (string) a directory. + {opts}: (dict) can be: + edit : type of window the select file will be open. Or + pass a FuncRef and array of selected files will be + passed to that function. + layout: same as |g:nnn#layout| and overrides it if + specified. + + Example: +> + call nnn#pick('~/some-files', { 'edit': 'vertical split' }) +< + +============================================================================= +Miscellaneous *nnn-misc* + +You can define env variables in `vimrc` and nnn will detect it. +> + let $NNN_RESTRICT_NAV_OPEN=1 +< + +============================================================================= +Credits *nnn-credits* + +Main nnn program by Arun Prakash Jana +github: https://github.com/jarun + +Vim/neovim plugin maintained by Michael Chris Lopez +gitub: https://github.com/mcchrish + +Source codes: +nnn: https://github.com/jarun/nnn +vim plugin: https://github.com/mcchrish/nnn.vim + +============================================================================= +vim:tw=78:ts=2:et:ft=help:norl: diff --git a/.local/share/nvim/plugged/nnn.vim/doc/tags b/.local/share/nvim/plugged/nnn.vim/doc/tags new file mode 100644 index 0000000..4ca5091 --- /dev/null +++ b/.local/share/nvim/plugged/nnn.vim/doc/tags @@ -0,0 +1,21 @@ +:NnnPicker nnn.txt /*:NnnPicker* +:Np nnn.txt /*:Np* +g:nnn#action nnn.txt /*g:nnn#action* +g:nnn#command nnn.txt /*g:nnn#command* +g:nnn#layout nnn.txt /*g:nnn#layout* +g:nnn#replace_netrw nnn.txt /*g:nnn#replace_netrw* +g:nnn#set_default_mappings nnn.txt /*g:nnn#set_default_mappings* +g:nnn#statusline nnn.txt /*g:nnn#statusline* +nnn nnn.txt /*nnn* +nnn#pick() nnn.txt /*nnn#pick()* +nnn-commands nnn.txt /*nnn-commands* +nnn-config nnn.txt /*nnn-config* +nnn-credits nnn.txt /*nnn-credits* +nnn-func nnn.txt /*nnn-func* +nnn-help nnn.txt /*nnn-help* +nnn-intro nnn.txt /*nnn-intro* +nnn-mappings nnn.txt /*nnn-mappings* +nnn-misc nnn.txt /*nnn-misc* +nnn-req nnn.txt /*nnn-req* +nnn-usage nnn.txt /*nnn-usage* +nnn.vim nnn.txt /*nnn.vim* |