Skip to content

Commit

Permalink
lots of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
David Chen committed Sep 7, 2019
1 parent dfdee4f commit 03439a7
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ view/
plugged/
sessions/
autoload/
tmp/
.netrwhist
_machine_specific.vim

132 changes: 74 additions & 58 deletions README-in-progress.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
# My NeoVim Config
# My NeoVim Config (A NeoVim Config for Colemak Users)

#### Please, for Linus Torvalds' sake, don't just copy this config without really looking at it! Please, at least, read this README file!

## After Installation, You Need To:

- [ ] Install `pynvim`
- [ ] Install `Node`
- [ ] Install `pynvim` (pip)
- [ ] Install `nodejs`
- [ ] Install nerd-font (actually it's optional but you really want it)

## After Installation, You Might Want To:

### On MacOS:

~~- [ ] Install MacVim and use Iterm2 if something is not working right~~
#### First of all
- [ ] Do `:checkhealth`

### Config `Python` path
#### Config `Python` path
- [ ] Well, make sure you have python
- [ ] See `_machine_specific.vim`

### For Code AutoComplete (NCM2)
#### For Code AutoComplete (coc)

- [ ] Install `font-mathematica` for `ncm2-match-highlight`
- [ ] Run `sudo python3 [your vim folder]/plugged/install.py`
- [ ] For python: `sudo pip3 install pylint autopep8 yapf`
Python:
- [ ] Do `pip3 install flake8` (for linting)

### For Taglist:
#### For Taglist:

- [ ] Install `ctags` for function/class/variable list

#### For inputing text ASCII art
- [ ] Install `figlet`

## Keyboard Shortcuts for `NORMAL` (`COMMAND`) Mode

### 1 Basic Commands
Expand All @@ -40,25 +45,28 @@

Since the `i` key has been mapped to `k`, every command (combination) that involves `i` should use `k` instead (for example, `ciw` should be `ckw`).

#### 1.2 Cursor Movement
#### 1.2 Remapped Cursor Movement

| Command | What it does | Equivalent (QWERTY) |
|------------|-----------------------------------------------------------|---------------------|
| `u` | cursor up a terminal line | `k` |
| `e` | cursor down a terminal line | `j` |
| `n` | cursor left | `h` |
| `i` | cursor right | `l` |
| `U` | cursor up 5 terminal lines | `5k` |
| `E` | cursor down 5 terminal lines | `5j` |
| `N` | cursor to the start of the line | `0` |
| `I` | cursor to the end of the line | `$` |
| `Ctrl` `u` | move the view port up 5 lines without moving the cursor | `Ctrl` `y` |
| `Ctrl` `e` | move the view port down 5 lines without moving the cursor | `Ctrl` `e` |
| `w` | next word | |
| `h` | move to the end of this word | `e` |
| `b` | previous word | |

#### 1.3 Some Other Commands That Your Moms Don't Tell You
| `u` | Cursor up a terminal line | `k` |
| `e` | Cursor down a terminal line | `j` |
| `n` | Cursor left | `h` |
| `i` | Cursor right | `l` |
| `U` | Cursor up 5 terminal lines | `5k` |
| `E` | Cursor down 5 terminal lines | `5j` |
| `N` | Cursor to the start of the line | `0` |
| `I` | Cursor to the end of the line | `$` |
| `Ctrl` `u` | Move the view port up 5 lines without moving the cursor | `Ctrl` `y` |
| `Ctrl` `e` | Move the view port down 5 lines without moving the cursor | `Ctrl` `e` |
| `h` | Move to the end of this word | `e` |

#### 1.3 Remapped Editor Commands
| Command | What it does |
|---------|--------------|
| `l` | undo |

#### 1.4 Some Other Commands to Know

| Command | What it does |
|---------|---------------------------------------|
Expand All @@ -67,6 +75,9 @@
| `<C-a>` | Increase the number under cursor by 1 |
| `<C-x>` | Decrease the number under cursor by 1 |
| `z=` | Show spell suggestions |
| `H` | Joins the current line with the next |
| `<` | Un-indent |
| `>` | Indent |


### 2 Window Management
Expand All @@ -80,61 +91,66 @@
| `sn` | Create a new vertical split screen and place it left to the current window |
| `si` | Create a new vertical split screen and place it right to the current window |
| `sv` | Set the two splits to be vertical |
| `sh | Set the two splits to be horizontal |
| `sh` | Set the two splits to be horizontal |
| `srv` | Rotate splits and arrange splits vertically |
| `srh` | Rotate splits and arrange splits horizontally

#### 2.2 Moving the Cursor Between Different Windows

| Action | Shortcut | Command |
|--------------------------------|------------|----------|
| Move cursor to the next window | `<SPACE>w` | `<C-w>w` |

### 3 Opening/Locating a File
#### 2.3 Resizing Different Windows
Use the arrow keys to resize the current window.

#### 3.1 NERDTree
## Plugins

| Action | Shortcut | Command |
|-----------------|----------|-------------------|
| Toggle NerdTree | `tt` | `:NERDTreeToggle` |
#### COC (AutoCompletion)

| Shortcut | Action |
|-------------|-----------------------|
| `Space` `y` | Get yank history list |
| `gd` | Go to definition |
| `gr` | List references |
| `gi` | List implementation |
| `gy` | Go to type definition |

#### 3.2 CtrlP (the fuzzy file finder)
#### NERDTree

| Action | Shortcut | Command |
|------------------|------------|--------------|
| Active CtrlP | `Ctrl` `p` | `:CtrlP<CR>` |
| Move up 1 item | `Ctrl` `u` | ` ` |
| Move down 1 item | `Ctrl` `e` | ` ` |
| Shortcut | Action | Command |
|----------|-----------------|-------------------|
| `tt` | Toggle NerdTree | `:NERDTreeToggle` |

### 4 AutoComplete (YCM)

| Action | Shortcut | Command |
|-------------------|----------|---------------------------------------------------|
| Go to definition | `gd` | `:YcmCompleter GoToDefinitionElseDeclaration<CR>` |
| Get documentation | `g/` | `:YcmCompleter GetDoc<CR>` |
| Get type | `gt` | `:YcmCompleter GetType<CR>` |
| Go to references | `gr` | `:YcmCompleter GoToReferences` |
#### FZF (the fuzzy file finder)

### 5 Undotree
| Shortcut | Action | Command |
|------------|------------------|---------------|
| `Ctrl` `p` | Active FZF | `:FZF<Enter>` |
| `Ctrl` `u` | Move up 1 item | ` ` |
| `Ctrl` `e` | Move down 1 item | ` ` |


#### Undotree

Press `Shift` + `L` to open Undotree

### 6 Bookmarks (vim-signiture)
### vim-signiture (Bookmarks)

| Action | Shortcut | Command |
|---------------------------------|-------------|---------|
| Add/remove mark at current line | `m<letter>` | |
| List all marks | `m/` | |
| Jump to the next mark in buffer | `m<SPACE>` | |
| Shortcut | Action | Command |
|-------------|---------------------------------|---------|
| `m<letter>` | Add/remove mark at current line | |
| `m/` | List all marks | |
| `m<SPACE>` | Jump to the next mark in buffer | |

For more commands, see [here](https://github.com/MattesGroeger/vim-bookmarks#usage)

### 7 Markdown File Editing

#### 7.1 Edit Table with `vim-table-mode`
#### vim-table-mode

Toggle "Table Editing Mode" with `<SPACE>tm` (equals to command `:TableModeToggle<CR>`)

### Some Other Useful Stuff
## Other Useful Stuff

#### Press `<SPACE>fd` to highlight adjacent duplicated words

Expand Down
8 changes: 1 addition & 7 deletions default_configs/_machine_specific_default.vim
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
" read through his file and change what you need to change

let g:python_host_prog='/usr/bin/python'
let g:python_host_prog='/usr/bin/python2'
let g:python3_host_prog='/usr/bin/python3'

" Language Server
let g:LanguageClient_serverCommands = {
\ 'python': ['/usr/bin/pyls'],
\ }


Loading

0 comments on commit 03439a7

Please sign in to comment.