mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
3 Commits
369687b047
...
4d7fd6580a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d7fd6580a | ||
|
|
f492a94db6 | ||
|
|
0c92d9a018 |
@ -143,7 +143,7 @@ Go to a string starting with `se`
|
|||||||
Some of the shortcuts I use frequently are listed here. In the following shortcuts, `<leader>` represents ASCII character `,`.
|
Some of the shortcuts I use frequently are listed here. In the following shortcuts, `<leader>` represents ASCII character `,`.
|
||||||
|
|
||||||
| Shortcut | Mode | platform | Description |
|
| Shortcut | Mode | platform | Description |
|
||||||
|-------------------|---------------|-----------------|------------------------------------------------------------------|
|
|-------------------|---------------|-----------------|--------------------------------------------------------------------------|
|
||||||
| `<leader>ff` | Normal | Linux/macOS/Win | Fuzzy file searching in a floating window |
|
| `<leader>ff` | Normal | Linux/macOS/Win | Fuzzy file searching in a floating window |
|
||||||
| `<leader>fh` | Normal | Linux/macOS/Win | Fuzzy help file grepping in a floating window |
|
| `<leader>fh` | Normal | Linux/macOS/Win | Fuzzy help file grepping in a floating window |
|
||||||
| `<leader>fg` | Normal | Linux/macOS/Win | Fuzzy project-wide grepping in a floating window |
|
| `<leader>fg` | Normal | Linux/macOS/Win | Fuzzy project-wide grepping in a floating window |
|
||||||
@ -167,12 +167,15 @@ Some of the shortcuts I use frequently are listed here. In the following shortcu
|
|||||||
| `<leader>gc` | Normal | Linux/macOS/Win | Run git commit |
|
| `<leader>gc` | Normal | Linux/macOS/Win | Run git commit |
|
||||||
| `<leader>gpl` | Normal | Linux/macOS/Win | Run git pull |
|
| `<leader>gpl` | Normal | Linux/macOS/Win | Run git pull |
|
||||||
| `<leader>gpu` | Normal | Linux/macOS/Win | Run git push |
|
| `<leader>gpu` | Normal | Linux/macOS/Win | Run git push |
|
||||||
| `<F9>` | Normal | Linux/macOS/Win | Run current source file (for Python, C++) |
|
| `<F9>` | Normal | Linux/macOS/Win | Compile&run current source file (for C++, LaTeX, Lua, Python) |
|
||||||
| `<F11>` | Normal | Linux/macOS/Win | Toggle spell checking |
|
| `<F11>` | Normal | Linux/macOS/Win | Toggle spell checking |
|
||||||
| `<F12>` | Normal | Linux/macOS/Win | Toggle paste mode |
|
| `<F12>` | Normal | Linux/macOS/Win | Toggle paste mode |
|
||||||
| `\x` | Normal | Linux/macOS/Win | Close location or quickfix window |
|
| `\x` | Normal | Linux/macOS/Win | Close location or quickfix window |
|
||||||
| `\d` | Normal | Linux/macOS/Win | Close current buffer and go to previous buffer |
|
| `\d` | Normal | Linux/macOS/Win | Close current buffer and go to previous buffer |
|
||||||
| `{count}gb` | Normal | Linux/macOS/Win | Go to buffer {count} or next buffer in the buffer list. |
|
| `{count}gb` | Normal | Linux/macOS/Win | Go to buffer `{count}` or next buffer in the buffer list. |
|
||||||
|
| `{operator}iB` | Normal | Linux/macOS/Win | Operate in the whole buffer, `{operator}` can be `v`, `y`, `c`, `d` etc. |
|
||||||
|
| `Alt-k` | Normal | Linux/macOS/Win | Move current line or selected lines up |
|
||||||
|
| `Alt-j` | Normal | Linux/macOS/Win | Move current line or selected lines down |
|
||||||
| `Alt-m` | Normal | macOS/Win | Markdown previewing in system browser |
|
| `Alt-m` | Normal | macOS/Win | Markdown previewing in system browser |
|
||||||
| `Alt-Shift-m` | Normal | macOS/Win | Stopping Markdown previewing in system browser |
|
| `Alt-Shift-m` | Normal | macOS/Win | Stopping Markdown previewing in system browser |
|
||||||
| `ob` | Normal/Visual | macOS/Win | Open link under cursor or search visual selection |
|
| `ob` | Normal/Visual | macOS/Win | Open link under cursor or search visual selection |
|
||||||
|
|||||||
@ -101,10 +101,6 @@ nnoremap / /\v
|
|||||||
" Search in selected region
|
" Search in selected region
|
||||||
xnoremap / :<C-U>call feedkeys('/\%>'.(line("'<")-1).'l\%<'.(line("'>")+1)."l")<CR>
|
xnoremap / :<C-U>call feedkeys('/\%>'.(line("'<")-1).'l\%<'.(line("'>")+1)."l")<CR>
|
||||||
|
|
||||||
" Find and replace (like Sublime Text 3)
|
|
||||||
nnoremap <C-H> :%s/
|
|
||||||
xnoremap <C-H> :s/
|
|
||||||
|
|
||||||
" Change current working directory locally and print cwd after that,
|
" Change current working directory locally and print cwd after that,
|
||||||
" see https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file
|
" see https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file
|
||||||
nnoremap <silent> <leader>cd :<C-U>lcd %:p:h<CR>:pwd<CR>
|
nnoremap <silent> <leader>cd :<C-U>lcd %:p:h<CR>:pwd<CR>
|
||||||
@ -171,6 +167,7 @@ onoremap <silent> iB :<C-U>call text_obj#Buffer()<CR>
|
|||||||
|
|
||||||
" Do not move my cursor when joining lines.
|
" Do not move my cursor when joining lines.
|
||||||
nnoremap J mzJ`z
|
nnoremap J mzJ`z
|
||||||
|
nnoremap gJ mzgJ`z
|
||||||
|
|
||||||
" Break inserted text into smaller undo units.
|
" Break inserted text into smaller undo units.
|
||||||
for ch in [',', '.', '!', '?', ';', ':']
|
for ch in [',', '.', '!', '?', ';', ':']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user