Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Action setting not working on vim 8.1 #108

@jorgeegomez

Description

@jorgeegomez

The mappings set in the nnn#action setting is being ignored, and sent as select_action(key) to n³. (I'm pretty sure it's the same issue that Jarun was seeing in #71)

To reproduce, in a clean Ubuntu 20.04 container, with default vim (8.1) and nnn 4.2:

Setup a minimal vim config:

call plug#begin('~/.vim/plugged')
Plug 'mcchrish/nnn.vim'
call plug#end()
let mapleader=","      " change leader key to ,
let maplocalleader="," " change local leader key to ,

let g:nnn#set_default_mappings = 0
nnoremap <leader>n :NnnPicker %:p:h<CR>
let g:nnn#replace_netrw = 1 " Open nnn instead of netrw when opening a directory
let g:nnn#command = 'NNN_RESTRICT_NAV_OPEN=1 NNN_CONTEXT_COLORS="4236" nnn'
let g:nnn#action = {
    \ '<c-h>': 'tab split',
    \ '<c-x>': 'split',
    \ '<c-v>': 'vsplit' }
let g:nnn#statusline = 0

Call the plugin, and press c-h on a file.

Expected: File opens in a new tab

Result: A new buffer opens, with the current dir listing, and the text elect_action("<c-h>") on the first line (no s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions