@@ -8,13 +8,13 @@ https://user-images.githubusercontent.com/7200153/127453278-3e638e33-707a-49c8-b
88 <small >colorscheme <a href =" https://github.com/pgdouyon/vim-yin-yang " >yin</a ></small >
99</p >
1010
11- ### Requirements
11+ ## Requirements
1212
13131 . n³
14142 . ` has('nvim') || has('terminal') ` i.e. terminal support
15153 . Optional ` has('nvim-0.5') || has('popupwin') ` for floating window
1616
17- ### Install
17+ ## Install
1818
1919n³ must be installed. Instructions
2020[ here] ( https://github.com/jarun/nnn/wiki/Usage#installation ) .
@@ -26,7 +26,7 @@ Then install the plugin using your plugin manager:
2626Plug 'mcchrish/nnn.vim'
2727```
2828
29- ### Usage
29+ ## Usage
3030
3131To open n³ as a file picker in vim/neovim, use the command ` :NnnPicker ` or the
3232key-binding ` <leader>n ` . The command accepts an optional path to open e.g.
@@ -48,9 +48,9 @@ To discard selection and exit, press <kbd>^G</kbd>.
4848
4949For complete plugin documentation see ` :help nnn ` .
5050
51- ### Configuration
51+ ## Configuration
5252
53- #### Custom mappings
53+ ### Custom mappings
5454
5555``` vim
5656" Disable default mappings
@@ -63,7 +63,7 @@ nnoremap <silent> <leader>nn :NnnPicker<CR>
6363nnoremap <leader>n :NnnPicker %:p:h<CR>
6464```
6565
66- #### Layout
66+ ### Layout
6767
6868``` vim
6969" Opens the n³ window in a split
@@ -76,7 +76,7 @@ let g:nnn#layout = { 'left': '~20%' } " or right, up, down
7676let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
7777```
7878
79- #### Action
79+ ### Action
8080
8181It's possible to set extra key-bindings for opening files in various ways.
8282No default is set so that n³'s key-bindings are not overridden.
@@ -93,7 +93,7 @@ open the selected file in a tab instead of the current window. <kbd>^X</kbd>
9393will open in a split an so on. Multi-selected files will be loaded in the
9494buffer list.
9595
96- #### Persistent session
96+ ### Persistent session
9797
9898n³ sessions can be used to remember the location when it is reopened.
9999
@@ -106,9 +106,9 @@ let g:nnn#session = 'global'
106106```
107107
108108Note: If desired, an n³ session can be disabled temporarily by passing
109- ` session: false ` as an option to ` nnn#pick() ` .
109+ ` session: 0 ` as an option to ` nnn#pick() ` .
110110
111- #### Command override
111+ ### Command override
112112
113113It's possible to override the default n³ command and add some extra program
114114options.
@@ -121,7 +121,7 @@ let g:nnn#command = 'nnn -d'
121121let g:nnn#command = 'NNN_TRASH=1 nnn -d'
122122```
123123
124- #### ` nnn#pick() `
124+ ### ` nnn#pick() `
125125
126126The ` nnn#pick([<dir>][,<opts>]) ` function can be called with a custom directory
127127and additional options such as opening file in splits or tabs. It's a more
@@ -137,26 +137,32 @@ call nnn#pick('~/some-directory', { 'edit': 'vertical split' })
137137- ` edit ` - type of window the select file will be open.
138138- ` layout ` - same as ` g:nnn#layout ` and overrides it if specified.
139139
140- #### Environment variables
140+ ### Environment variables
141141
142142n³ will detect env variables defined in ` vimrc ` .
143143
144144``` vim
145145let $NNN_TRASH=1
146146```
147147
148- #### Setup for ` init.lua `
148+ ### Setup for ` init.lua `
149149
150- Use the same option names as you would in Vimscript , e.g.:
150+ Use the same option names as you would in Vim script , e.g.:
151151
152152``` lua
153- require (' nnn' ).setup {
154- set_default_mappings = false ,
155- session = ' global' ,
156- layout = { left = ' 20%' }
157- }
153+ require (" nnn" ).setup ({
154+ command = " nnn -o -C" ,
155+ set_default_mappings = 0 ,
156+ replace_netrw = 1 ,
157+ action = {
158+ [" <c-t>" ] = " tab split" ,
159+ [" <c-s>" ] = " split" ,
160+ [" <c-v>" ] = " vsplit" ,
161+ [" <c-o>" ] = copy_to_clipboard ,
162+ },
163+ })
158164```
159165
160- ### Credits
166+ ## Credits
161167
162- Main n³ program: https://github.com/jarun/nnn
168+ Main [ n³ repository ] ( https://github.com/jarun/nnn ) .
0 commit comments