All Projects → mcchrish → Nnn.vim

mcchrish / Nnn.vim

Licence: bsd-2-clause
File manager for vim/neovim powered by n³

Projects that are alternatives of or similar to Nnn.vim

Vim Monokai Tasty
VIM Colour scheme
Stars: ✭ 279 (-32.61%)
Mutual labels:  neovim, vim-plugin
Spaceduck
🚀 🦆 An intergalactic space theme for Vim, Terminal, and more!
Stars: ✭ 177 (-57.25%)
Mutual labels:  neovim, vim-plugin
Gen tags.vim
Async plugin for vim and neovim to ease the use of ctags/gtags
Stars: ✭ 288 (-30.43%)
Mutual labels:  neovim, vim-plugin
Electerm
📻Terminal/ssh/sftp client(linux, mac, win)
Stars: ✭ 4,763 (+1050.48%)
Mutual labels:  file-manager, terminal
Cfiles
A ncurses file manager written in C with vim like keybindings
Stars: ✭ 319 (-22.95%)
Mutual labels:  file-manager, terminal
Vaffle.vim
📁 Lightweight, window-based file manager for Vim
Stars: ✭ 269 (-35.02%)
Mutual labels:  file-manager, vim-plugin
Lf
Terminal file manager
Stars: ✭ 3,686 (+790.34%)
Mutual labels:  file-manager, terminal
virt-column.nvim
Display a character as the colorcolumn
Stars: ✭ 64 (-84.54%)
Mutual labels:  neovim, vim-plugin
Dashboard Nvim
vim dashboard
Stars: ✭ 294 (-28.99%)
Mutual labels:  neovim, vim-plugin
Fff
📁 A simple file manager written in bash.
Stars: ✭ 3,445 (+732.13%)
Mutual labels:  file-manager, terminal
format.nvim
Neovim lua plugin to format the current buffer with external executables
Stars: ✭ 189 (-54.35%)
Mutual labels:  neovim, vim-plugin
Barbar.nvim
A neovim tabline plugin.
Stars: ✭ 359 (-13.29%)
Mutual labels:  neovim, vim-plugin
cmp-under-comparator
nvim-cmp comparator function for completion items that start with one or more underlines
Stars: ✭ 77 (-81.4%)
Mutual labels:  neovim, vim-plugin
Rover
simple file browser for the terminal
Stars: ✭ 278 (-32.85%)
Mutual labels:  file-manager, terminal
vim-stamp
A vim plugin that replaces the currently selected text with the text in the delete register
Stars: ✭ 13 (-96.86%)
Mutual labels:  neovim, vim-plugin
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (-31.64%)
Mutual labels:  neovim, vim-plugin
Nerdtree
A tree explorer plugin for vim.
Stars: ✭ 16,380 (+3856.52%)
Mutual labels:  file-manager, vim-plugin
vim
📝 minimalistic vimrc based on KISS principle @vim
Stars: ✭ 46 (-88.89%)
Mutual labels:  neovim, vim-plugin
Vimtex
VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
Stars: ✭ 3,609 (+771.74%)
Mutual labels:  neovim, vim-plugin
Rigel
🌌 Colorscheme for vim, terminal, vscode and slack - based on the star Rigel ✨.
Stars: ✭ 324 (-21.74%)
Mutual labels:  neovim, vim-plugin

nnn.vim

File manager for vim/neovim powered by n³.

colorscheme yin

Requirements

  1. Neovim or Vim 8.1 with terminal support

Install

You must install n³ itself. Instructions here.

Then install using your favorite plugin manager:

" using vim-plug
Plug 'mcchrish/nnn.vim'

Usage

To open n³ as a file picker in vim/neovim, use the command :NnnPicker or :Np or the key-binding <leader>n. You can pass a directory to :NnnPicker command and opens n³ from there e.g. :NnnPicker path/to/somewhere.

Once you select one or more files and press enter, vim quits the n³ window and opens the first selected file and add the remaining files to the arg list/buffer list.

Pressing enter on a file in n³ will pick any earlier selection, pick the file and exit n³.

Note that pressing l or Right on a file would open it instead of picking.

To discard selection and exit, press ^G.

You may have to set set hidden to make floating window work.

Please visit the complete documentation by running :help nnn.

Configurations

Custom mappings

" Disable default mappings
let g:nnn#set_default_mappings = 0

" Then 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>

Layout

" Opens the n³ 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

" Floating window (neovim latest and vim with patch 8.2.191)
let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }

Action

You can set extra key-bindings for opening files in different ways. Nothing is set by default to not override n³'s own key-bindings.

let g:nnn#action = {
      \ '<c-t>': 'tab split',
      \ '<c-x>': 'split',
      \ '<c-v>': 'vsplit' }

For example, when inside an n³ window, pressing ctrl-t will open the selected file in a tab, instead of the current window. ctrl-x will open in a split an so on. Meanwhile for multi selected files will be loaded in the buffer list.

Command override

When you want to override the default n³ command and add some extra flags. Example you want to start n³ in detail mode.

let g:nnn#command = 'nnn -d'

" or pass some env variables
let g:nnn#command = 'NNN_TRASH=1 nnn -d'

nnn#pick()

The nnn#pick([<dir>][,<opts>]) function 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.

call nnn#pick('~/some-files', { 'edit': 'vertical split' })
" Then you can do all kinds of mappings if you want

opts can be:

  • edit - type of window the select file will be open.
  • layout - same as g:nnn#layout and overrides it if specified.

Environment variables

You can define env variables in vimrc and n³ will detect it.

let $NNN_TRASH=1

Credits

Main n³ program: https://github.com/jarun/nnn

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].