Skip to content

Commit a342870

Browse files
committed
update requirements in docs
1 parent e73451e commit a342870

2 files changed

Lines changed: 29 additions & 26 deletions

File tree

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
File manager for vim/neovim powered by n³.
44

55
https://user-images.githubusercontent.com/7200153/127453278-3e638e33-707a-49c8-b34e-225c225906b1.mov
6+
67
<p align="center">
78
<small>colorscheme <a href="https://github.com/pgdouyon/vim-yin-yang">yin</a></small>
89
</p>
910

1011
### Requirements
1112

1213
1.
13-
2. Neovim or Vim 8.1 with terminal support
14+
2. `has('nvim') || has('terminal')` with terminal support
15+
3. Optional `has('nvim-0.5') || has('popupwin')` for floating window
1416

1517
### Install
1618

@@ -26,9 +28,9 @@ Plug 'mcchrish/nnn.vim'
2628

2729
### Usage
2830

29-
To open n³ as a file picker in vim/neovim, use the command `:NnnPicker` or
30-
`:Np` or the key-binding `<leader>n`. The command accepts an optional path
31-
to open e.g. `:NnnPicker path/to/somewhere`.
31+
To open n³ as a file picker in vim/neovim, use the command `:NnnPicker` or the
32+
key-binding `<leader>n`. The command accepts an optional path to open e.g.
33+
`:NnnPicker path/to/somewhere`.
3234

3335
Run the plugin, [select file(s)](https://github.com/jarun/nnn/wiki/concepts#selection)
3436
and press <kbd>Enter</kbd> to quit the n³ window. Now vim will open the first
@@ -42,9 +44,9 @@ instead of picking.
4244

4345
To discard selection and exit, press <kbd>^G</kbd>.
4446

45-
vim config `set hidden` may be required for the floating windows to work.
47+
`set hidden` may be required for the floating windows to work.
4648

47-
Complete plugin documentation - `:help nnn`.
49+
For complete plugin documentation see `:help nnn`.
4850

4951
### Configuration
5052

@@ -54,11 +56,9 @@ Complete plugin documentation - `:help nnn`.
5456
" Disable default mappings
5557
let g:nnn#set_default_mappings = 0
5658
57-
" Set personalized mappings
59+
" Set custom mappings
5860
nnoremap <silent> <leader>nn :NnnPicker<CR>
5961
60-
61-
" OR override
6262
" Start n³ in the current file's directory
6363
nnoremap <leader>n :NnnPicker %:p:h<CR>
6464
```
@@ -72,7 +72,7 @@ let g:nnn#layout = 'new' " or vnew, tabnew etc.
7272
" Or pass a dictionary with window size
7373
let g:nnn#layout = { 'left': '~20%' } " or right, up, down
7474
75-
" Floating window (neovim latest and vim with patch 8.2.191)
75+
" Floating window.
7676
let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
7777
```
7878

@@ -89,8 +89,9 @@ let g:nnn#action = {
8989
```
9090

9191
With the above example, when inside an n³ window, pressing <kbd>^T</kbd> will
92-
open the selected file in a tab instead of the current window. <kbd>^X</kbd> will
93-
open in a split an so on. Multi-selected files will be loaded in the buffer list.
92+
open the selected file in a tab instead of the current window. <kbd>^X</kbd>
93+
will open in a split an so on. Multi-selected files will be loaded in the
94+
buffer list.
9495

9596
#### Persistent session
9697

@@ -109,7 +110,8 @@ Note: If desired, an n³ session can be disabled temporarily by passing
109110

110111
#### Command override
111112

112-
It's possible to override the default n³ command and add some extra program options.
113+
It's possible to override the default n³ command and add some extra program
114+
options.
113115

114116
```vim
115117
" to start n³ in detail mode:
@@ -148,7 +150,7 @@ let $NNN_TRASH=1
148150
Use the same option names as you would in Vimscript, e.g.:
149151

150152
```lua
151-
require('nnn').setup{
153+
require('nnn').setup {
152154
set_default_mappings = false,
153155
session = 'global',
154156
layout = { left = '20%' }

doc/nnn.txt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ terminal feature of vim and neovim.
3333
Requirements *nnn-req*
3434

3535
1. n³
36-
2. Neovim or Vim 8.1 with terminal support
36+
2. `has('nvim') || has('terminal')` with terminal support
37+
3. Optional `has('nvim-0.5') || has('popupwin')` for floating window
3738

3839
=============================================================================
3940
Usage *nnn-usage*
@@ -96,10 +97,10 @@ g:nnn#set_default_mappings *g:nnn#set_default_mappings*
9697

9798
g:nnn#layout *g:nnn#layout*
9899
Default: { 'window': { 'width': 0.9, 'height': 0.6 } }
99-
Display type for the n³ buffer. Default is a floating window. |enew|
100-
has a special behavior to act as a "split explorer" reusing
101-
the current window and brings back the last buffer if
102-
nothing is selected.
100+
Display type for the n³ buffer. Default is a floating
101+
window. |enew| has a special behavior to act as a
102+
"split explorer" reusing the current window and brings back
103+
the last buffer if nothing is selected.
103104
Examples:
104105
>
105106
" Opens the n³ window in a split
@@ -108,7 +109,7 @@ g:nnn#layout *g:nnn#layout*
108109
" Or pass a dictionary with window size
109110
let g:nnn#layout = { 'left': '~20%' } " or right, up, down
110111
111-
" Floating window (neovim only for now)
112+
" Floating window
112113
let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
113114
" Options:
114115
" width, height, yoffset, xoffset : number
@@ -149,10 +150,10 @@ g:nnn#action *g:nnn#action*
149150

150151
g:nnn#session *g:nnn#session*
151152
Default: 'none'
152-
How n³ should utilize sessions. Default is 'none' meaning no
153-
persistent sessions. Other options are 'local' for the same
154-
n³ session across a vim session, or 'global' for the same n³
155-
session across everywhere.
153+
How n³ should utilize sessions. Default is 'none' meaning
154+
no persistent sessions. Other options are 'local' for the
155+
same n³ session across a vim session, or 'global' for the
156+
same n³ session across everywhere.
156157
>
157158
" use the same nnn session within a vim session, for
158159
" example, so that consecutive uses of :Np will remember
@@ -209,8 +210,8 @@ nnn#pick([{dir}][,{opts}]) *nnn#pick()*
209210
{dir} : (string) a directory.
210211
{opts}: (dict) can be:
211212
edit : type of window the select file will be open. Or
212-
pass a FuncRef and array of selected files will be
213-
passed to that function.
213+
pass a FuncRef and array of selected files will
214+
be passed to that function.
214215
layout: same as |g:nnn#layout| and overrides it if
215216
specified.
216217

0 commit comments

Comments
 (0)