preservim / nerdtree

A tree explorer plugin for vim.
Do What The F*ck You Want To Public License
19.56k stars 1.44k forks source link

<c-j> <c-k> remaps not working #1424

Closed MatthewUng closed 3 months ago

MatthewUng commented 3 months ago

Self-Diagnosis

Before creating an issue, take some time to search these resources for an answer. It's possible that someone else has already seen and solved your issue.

Environment

I have the following in my vimrc that I frequently use for navigation.

nnoremap <c-j> <c-d>
nnoremap <c-k> <c-u>
vnoremap <c-j> <c-d>
vnoremap <c-k> <c-u>

Steps to Reproduce the Issue

  1. Open nerdtree window
  2. \ and \ do not work as intended based on my vimrc maps.

Current Behavior (Include screenshots where appropriate.)

\ and \ move up and down one line

Expected Result

\ and \ move up and down half a page

rzvxa commented 3 months ago

Both <c-j> and <c-k> already have their own behavior - moving up and down in a directory - You should remap them to something else first. use :help NERDTree-C-J to open the help section for this specific mapping, And use :help NERDTreeMappings to open the list of all NERDTree mappings.

MatthewUng commented 3 months ago

This is perfect. Thank you!