Skip to content

Instantly share code, notes, and snippets.

@ctaylo21
Created April 13, 2019 00:47
Show Gist options
  • Save ctaylo21/005ace7b991d9e343c580ae501077d50 to your computer and use it in GitHub Desktop.
Save ctaylo21/005ace7b991d9e343c580ae501077d50 to your computer and use it in GitHub Desktop.
Neovim mappings for Denite
" === Denite shorcuts === "
" ; - Browser currently open buffers
" <leader>t - Browse list of files in current directory
" <leader>g - Search current directory for occurences of given term and
" close window if no results
" <leader>j - Search current directory for occurences of word under cursor
nmap ; :Denite buffer -split=floating -winrow=1<CR>
nmap <leader>t :Denite file/rec -split=floating -winrow=1<CR>
nnoremap <leader>g :<C-u>Denite grep:. -no-empty -mode=normal<CR>
nnoremap <leader>j :<C-u>DeniteCursorWord grep:. -mode=normal<CR>
@hffaust
Copy link

hffaust commented Jan 8, 2020

Where is this file supposed to go? Is it a standalone file or is it just a snippet of code that is supposed to be added to a preexisting file? I am trying to set up for use with NeoVim. Thank you.

@ctaylo21
Copy link
Author

ctaylo21 commented Jan 8, 2020

The easiest approach would just be to put it in your init.vim file. You can see how I dd it in my config file here: https://github.com/ctaylo21/jarvis/blob/master/config/nvim/init.vim#L65

@hffaust
Copy link

hffaust commented Jan 8, 2020

Thank you so much for clarifying! Makes more sense now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment