Repository navigation
Expand file tree
/
Copy pathinit.vim
More file actions
57 lines (45 loc) · 1.5 KB
/
Copy pathinit.vim
File metadata and controls
57 lines (45 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
" neovim config
" would like to use leap in VS Code but it seems to cause problems
if exists('g:vscode')
call plug#begin('~/.vim/plugged')
Plug 'ggandor/leap.nvim'
call plug#end()
lua require('leap').add_default_mappings()
else
" things to only do in regular Neovim
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-repeat'
Plug 'ggandor/leap.nvim'
Plug 'tpope/vim-surround'
Plug 'chriskempson/base16-vim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.1' }
" recommended by telescope readme to improve sort perf
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
call plug#end()
colorscheme base16-tomorrow-night
" vnoremap p "0p
" vnoremap P "0P
" vnoremap y "0y
" vnoremap d "0d
" Telescope
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
set number
lua require('leap').add_default_mappings()
endif
" Global things
" Leap
" make it so j/k work on the fake "lines" of a wrapped line
map k gk
map j gj
" Helix-like keymap
" Map 'x/X' to start visual line mode and select more lines on subsequent presses
" nnoremap x V
" nnoremap X V
" vnoremap x j
" vnoremap X k
" Map 'd' to delete a single character in normal mode
" nnoremap d x