Skip to content

sayanarijit/xplr.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTICE: This repository is looking for a new owner+maintainer as I want to dedicate my focus on maintaining xplr. Please contact me in case you are interested.

xplr.vim

This is a fork of nnn.vim modified to work with xplr.

Setup

Vim Plug:

call plug#begin('~/.vim/plugged')
" ...
Plug 'sayanarijit/xplr.vim'
" ...
call plug#end()

let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.9, 'highlight': 'Debug' } }
let g:nnn#action = {
      \ '<c-t>': 'tab split',
      \ '<c-x>': 'split',
      \ '<c-v>': 'vsplit' }
let g:nnn#replace_netrw = 1

packer.nvim:

require("packer").startup(function()
  -- ...
  use({
    "sayanarijit/xplr.vim",
    config = function()
      vim.cmd([[
        let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.9, 'highlight': 'Debug' } }
        let g:nnn#action = {
              \ '<c-t>': 'tab split',
              \ '<c-x>': 'split',
              \ '<c-v>': 'vsplit' }
        let g:nnn#replace_netrw = 1
      ]])
    end,
  })
  -- ...
end)

Examples

Git project root

command XplrProjectRoot :XplrPicker `git rev-parse --show-toplevel`

:XplrProjectRoot

Current file

:XplrPicker %:p

Current working directory

:XplrPicker

Root

:XplrPicker /

Languages

  • Vim Script 100.0%