├── .gitignore
├── README-legacy.md
├── README.md
├── README_cn.md
├── Ultisnips
├── README.md
├── c.snippets
├── cs.snippets
├── dart.snippets
├── go.snippets
├── java.snippets
├── javascript.snippets
├── markdown.snippets
├── python.snippets
├── racket.snippets
├── swift.snippets
├── tex.snippets
├── typescriptreact.snippets
└── vim.snippets
├── autoload
└── plug.vim
├── coc-settings.json
├── cursor.vim
├── cursor_for_qwerty.vim
├── default_configs
└── _machine_specific_default.vim
├── demo.png
├── ftplugin
├── c.vim
├── cs.vim
├── dart.vim
├── go.vim
├── graphml.vim
├── java.vim
├── markdown.vim
├── prisma.vim
├── racket.vim
├── swift.vim
└── text.vim
├── init.vim
├── lua
└── swap_ternary.lua
├── md-snippets.vim
├── sample_vimspector_json
└── python.json
└── tmp
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | .DS_Store
3 | view/
4 | plugged/
5 | sessions/
6 | autoload/plug.vim.old
7 | tmp/
8 | .netrwhist
9 | _machine_specific.vim
10 | .vim-bookmarks
11 |
12 |
--------------------------------------------------------------------------------
/README-legacy.md:
--------------------------------------------------------------------------------
1 | ## My NeoVim Config
2 |
3 | ### Documentation:
4 |
5 | #### Check Out [This](https://kjhuanhao.github.io/2019/08/24/Theniceboy-s-nvim-configuration/) by [kjhuanhao](https://github.com/kjhuanhao)
6 |
7 | #### Simplified Version Coming Up...
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ##
The Ultimate NeoVim Config for [Colemak](https://colemak.com/) Users
2 |
3 |
4 |
5 |
6 |
7 | [中文版](./README_cn.md)
8 |
9 | Please **DO NOT** just copy this configuration folder without really looking at it! Please, at least, read this README file!
10 |
11 |
12 |
13 | * [Requirements](#requirements)
14 | * [After Installation, You Need To](#after-installation-you-need-to)
15 | * [After Installation, You Might Want To](#after-installation-you-might-want-to)
16 | - [First of all](#first-of-all)
17 | - [For Python Debugger (via `vimspector`)](#for-python-debugger-via-vimspector)
18 | - [Config `Python` path](#config-python-path)
19 | - [For Taglist:](#for-taglist)
20 | - [For FZF](#for-fzf)
21 | - [And also...](#and-also)
22 | * [Keyboard Shortcuts](#keyboard-shortcuts)
23 | - [1 Basic Editor Features](#1-basic-editor-features)
24 | + [1.1 The Most Basics](#11-the-most-basics)
25 | + [1.2 Remapped Cursor Movement](#12-remapped-cursor-movement)
26 | + [1.3 Remapped Insert Mode Keys](#13-remapped-insert-mode-keys)
27 | + [1.4 Remapped Text Manipulating Commands in Normal Mode](#14-remapped-text-manipulating-commands-in-normal-mode)
28 | + [1.5 Other Useful Normal Mode Remappings](#15-other-useful-normal-mode-remappings)
29 | + [1.6 Remapped Commands in Visual Mode](#16-remapped-commands-in-visual-mode)
30 | - [2 Window Management](#2-window-management)
31 | + [2.1 Creating Window Through Split Screen](#21-creating-window-through-split-screen)
32 | + [2.2 Moving the Cursor Between Different Windows](#22-moving-the-cursor-between-different-windows)
33 | + [2.3 Resizing Different Windows](#23-resizing-different-windows)
34 | + [2.4 Closing Windows](#24-closing-windows)
35 | - [3 Tab Management](#3-tab-management)
36 | - [4 Terminal Keyboard Shortcuts](#4-terminal-keyboard-shortcuts)
37 | * [Plugins Keybindings (Screenshots/GIF provided!)](#plugins-keybindings-screenshotsgif-provided)
38 | - [AutoCompletion](#autocompletion)
39 | + [COC (AutoCompletion)](#coc-autocompletion)
40 | + [coc-snippets](#coc-snippets)
41 | - [File Navigation](#file-navigation)
42 | + [coc-explorer (file browser)](#coc-explorer-file-browser)
43 | + [rnvimr - file browser](#rnvimr---file-browser)
44 | + [FZF - the fuzzy file finder](#fzf---the-fuzzy-file-finder)
45 | + [xtabline (the fancy tab line)](#xtabline-the-fancy-tab-line)
46 | - [Text Editing Plugins](#text-editing-plugins)
47 | + [vim-table-mode](#vim-table-mode)
48 | + [Undotree](#undotree)
49 | + [vim-visual-multi](#vim-visual-multi)
50 | + [vim-surround](#vim-surround)
51 | + [vim-subversive](#vim-subversive)
52 | + [vim-easy-align](#vim-easy-align)
53 | + [AutoFormat](#autoformat)
54 | + [vim-markdown-toc (generate table of contents for markdown files)](#vim-markdown-toc-generate-table-of-contents-for-markdown-files)
55 | - [Navigation Within Buffer](#navigation-within-buffer)
56 | + [Vista.vim](#vistavim)
57 | - [Find and Replace](#find-and-replace)
58 | + [Far.vim - find and replace](#farvim---find-and-replace)
59 | - [Git Related](#git-related)
60 | + [vim-gitgutter](#vim-gitgutter)
61 | + [fzf-gitignore](#fzf-gitignore)
62 | - [Others](#others)
63 | + [vim-calendar](#vim-calendar)
64 | + [Goyo - Work without distraction](#goyo---work-without-distraction)
65 | + [suda.vim](#sudavim)
66 | + [coc-translator](#coc-translator)
67 | * [Custom Snippets](#custom-snippets)
68 | - [Markdown](#markdown)
69 | * [Some Weird Stuff](#some-weird-stuff)
70 | - [Press `tx` and enter your text](#press-tx-and-enter-your-text)
71 | - [Customized Vertical Cursor Movement](#customized-vertical-cursor-movement)
72 |
73 |
74 |
75 | ## Requirements
76 | - This nvim configuration **REQUIRES** NeoVim 0.6.0+
77 | ## After Installation, You Need To
78 | - Install `pip3`, and do `pip3 install --user pynvim`
79 | - Install `node`, and do `npm install -g neovim`
80 | - Install nerd-fonts (actually it's optional but it looks real good)
81 |
82 | ## After Installation, You Might Want To
83 | ### First of all
84 | - Do `:checkhealth`
85 |
86 | ### For Python Debugger (via `vimspector`)
87 | - Install `debugpy` (`pip`)
88 |
89 | ### Config `Python` path
90 | - Well, make sure you have python
91 | - See `_machine_specific.vim`
92 |
93 | ### For Taglist:
94 | - Install `ctags` for function/class/variable list
95 |
96 | ### For FZF
97 | - Install `fzf`
98 | - Install `ag` (`the_silver_searcher`)
99 |
100 | ### And also...
101 | - Install `figlet` for inputing text ASCII art
102 | - Install `xclip` for system clipboard access (`Linux` and `xorg` only)
103 |
104 | ## Keyboard Shortcuts
105 | ### 1 Basic Editor Features
106 | #### 1.1 The Most Basics
107 | **`k`** : switchs to **`INSERT`** : mode (same as key `i` in vanilla vim)
108 |
109 | **`Q`** : quits current vim window (same as command `:q` in vanilla vim)
110 |
111 | **`S`** : saves the current file (same as command `:w` in vanilla vim)
112 |
113 | **_IMPORTANT_**
114 |
115 | 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`).
116 |
117 | #### 1.2 Remapped Cursor Movement
118 | | Shortcut | Action | Equivalent |
119 | |------------|-----------------------------------------------------------|------------|
120 | | `u` | Cursor up a terminal line | `k` |
121 | | `e` | Cursor down a terminal line | `j` |
122 | | `n` | Cursor left | `h` |
123 | | `i` | Cursor right | `l` |
124 | | `U` | Cursor up 5 terminal lines | `5k` |
125 | | `E` | Cursor down 5 terminal lines | `5j` |
126 | | `N` | Cursor to the start of the line | `0` |
127 | | `I` | Cursor to the end of the line | `$` |
128 | | `Ctrl` `u` | Move the view port up 5 lines without moving the cursor | `Ctrl` `y` |
129 | | `Ctrl` `e` | Move the view port down 5 lines without moving the cursor | `Ctrl` `e` |
130 | | `h` | Move to the end of this word | `e` |
131 | | `W` | Move cursor five words forward | `5w` |
132 | | `B` | Move cursor five words forward | `5b` |
133 |
134 | #### 1.3 Remapped Insert Mode Keys
135 | | Shortcut | Action |
136 | |------------|----------------------------------------------------------------------|
137 | | `Ctrl` `a` | Move cursor to the end of the line |
138 | | `Ctrl` `u` | Move the character on the right of the cursor to the end of the line |
139 |
140 | #### 1.4 Remapped Text Manipulating Commands in Normal Mode
141 | | Shortcut | Action |
142 | |-----------------|---------------------------------------|
143 | | `l` | **undo** |
144 | | `<` | Un-indent |
145 | | `>` | Indent |
146 | | `SPACE` `SPACE` | Goto the next placeholder (`<++>`) |
147 |
148 | #### 1.5 Other Useful Normal Mode Remappings
149 | | Shortcut | Action |
150 | |-----------------|------------------------------------------------|
151 | | `r` | **Compile/Run the current file** |
152 | | `SPACE` `s` `c` | Toggle spell suggestion a |
153 | | `SPACE` `d` `w` | Find adjacent duplicated word |
154 | | `SPACE` `t` `t` | Convert every 4 Spaces to a tab |
155 | | `SPACE` `o` | Fold |
156 | | `SPACE` `-` | Previous quick-fix position |
157 | | `SPACE` `+` | Next quick-fix position |
158 | | `\` `p` | Show the path of the current file |
159 | | `SPACE` `/` | Create a new terminal below the current window |
160 |
161 | #### 1.6 Remapped Commands in Visual Mode
162 | | Shortcut | Action |
163 | |-----------------|----------------------------------------|
164 | | `Y` | Copy selected text to system clipboard |
165 |
166 |
167 | ### 2 Window Management
168 | #### 2.1 Creating Window Through Split Screen
169 | | Shortcut | Action |
170 | |-------------|-----------------------------------------------------------------------------|
171 | | `s` `u` | Create a new horizontal split screen and place it above the current window |
172 | | `s` `e` | Create a new horizontal split screen and place it below the current window |
173 | | `s` `n` | Create a new vertical split screen and place it left to the current window |
174 | | `s` `i` | Create a new vertical split screen and place it right to the current window |
175 | | `s` `v` | Set the two splits to be vertical |
176 | | `s` `h` | Set the two splits to be horizontal |
177 | | `s` `r` `v` | Rotate splits and arrange splits vertically |
178 | | `s` `r` `h` | Rotate splits and arrange splits horizontally |
179 |
180 | #### 2.2 Moving the Cursor Between Different Windows
181 | | Shortcut | Action |
182 | |---------------|--------------------------------|
183 | | `SPACE` + `w` | Move cursor to the next window |
184 | | `SPACE` + `n` | Move cursor one window left |
185 | | `SPACE` + `i` | Move cursor one window right |
186 | | `SPACE` + `u` | Move cursor one window up |
187 | | `SPACE` + `e` | Move cursor one window down |
188 |
189 | #### 2.3 Resizing Different Windows
190 | Use the arrow keys to resize the current window.
191 |
192 | #### 2.4 Closing Windows
193 | | Shortcut | Action |
194 | |-------------|------------------------------------------------------------------------------------------------------------|
195 | | `Q` | Close the current window |
196 | | `SPACE` `q` | Close the window below the current window. (The current window will be closed if there is no window below) |
197 |
198 | ### 3 Tab Management
199 | | Shortcut | Action |
200 | |-------------|------------------|
201 | | `t` `u` | Create a new tab |
202 | | `t` `n` | Go one tab left |
203 | | `t` `i` | Go One tab right |
204 | | `t` `m` `n` | Move tab left |
205 | | `t` `m` `i` | Move tab right |
206 |
207 | ### 4 Terminal Keyboard Shortcuts
208 | | Shortcut | Action |
209 | |-------------|-------------------------------------------------------------|
210 | | `Ctrl` `n` | Escape from terminal input mode |
211 |
212 | ## Plugins Keybindings (Screenshots/GIF provided!)
213 | ### AutoCompletion
214 | #### [COC (AutoCompletion)](https://github.com/neoclide/coc.nvim)
215 | | Shortcut | Action |
216 | |-----------------|---------------------------|
217 | | `Space` `y` | **Get yank history list** |
218 | | `gd` | Go to definition |
219 | | `gr` | List references |
220 | | `gi` | List implementation |
221 | | `gy` | Go to type definition |
222 | | `Space` `r` `n` | Rename a variable |
223 |
224 |
225 |
226 | #### [coc-snippets](https://github.com/neoclide/coc-snippets)
227 | | Shortcut | Action |
228 | |------------|--------------------------------------------------|
229 | | `Ctrl` `e` | Expand a snippet |
230 | | `Ctrl` `n` | (in snippet) Previous Cursor position in snippet |
231 | | `Ctrl` `e` | (in snippet) Next Cursor position in snippet |
232 |
233 | 
234 |
235 | ### File Navigation
236 | #### [coc-explorer (file browser)](https://github.com/weirongxu/coc-explorer)
237 | | Shortcut | Action |
238 | |----------|-------------------------|
239 | | `tt` | **Open file browser** |
240 | | `?` | show help (in explorer) |
241 |
242 |
243 |
244 | #### [rnvimr - file browser](https://github.com/kevinhwang91/rnvimr)
245 | - [ ] Make sure you have ranger installed
246 |
247 | Press `R` to open Ranger (file selector)
248 |
249 | And Within rnvimr (ranger), you can:
250 | | Shortcut | Action |
251 | |------------|------------------------------------|
252 | | `Ctrl` `t` | Open the file in a new tab |
253 | | `Ctrl` `x` | Split up and down with the file |
254 | | `Ctrl` `v` | Split left and right with the file |
255 |
256 |
257 |
258 | #### [FZF - the fuzzy file finder](https://github.com/junegunn/fzf.vim)
259 | | Shortcut | Action |
260 | |------------|--------------------|
261 | | `Ctrl` `p` | **FZF Files** |
262 | | `Ctrl` `u` | Move up 1 item |
263 | | `Ctrl` `e` | Move down 1 item |
264 | | `Ctrl` `w` | FZF Buffers |
265 | | `Ctrl` `f` | FZF Files' Content |
266 | | `Ctrl` `h` | FZF Recent Files |
267 | | `Ctrl` `t` | FZF Tags |
268 |
269 |
270 |
271 | #### [xtabline (the fancy tab line)](https://github.com/mg979/vim-xtabline)
272 | | Shortcut | What it creates |
273 | |----------|-------------------|
274 | | `to` | Cycle tab mode |
275 | | `\p` | Show current path |
276 |
277 |
278 |
279 | ### Text Editing Plugins
280 | #### [vim-table-mode](https://github.com/dhruvasagar/vim-table-mode)
281 | | Shortcut | Action |
282 | |-----------------|-------------------|
283 | | `SPACE` `t` `m` | Toggle table mode |
284 | | `SPACE` `t` `r` | Realign table |
285 |
286 | See `:help table-mode.txt` for more.
287 |
288 | #### [Undotree](https://github.com/mbbill/undotree)
289 | | Shortcut | Action |
290 | |---------------|---------------|
291 | | `Shift` + `L` | Open Undotree |
292 | | `u` | Newer Version |
293 | | `e` | Older Version |
294 |
295 |
296 |
297 | #### [vim-visual-multi](https://github.com/mg979/vim-visual-multi)
298 | | Shortcut | Action |
299 | |------------|--------------------------------------------------|
300 | | `Ctrl`+`k` | **Select next key (multiple cursors)** |
301 | | `q` | **Deselect the current keys (multiple cursors)** |
302 | | `-` | Select the previous key |
303 | | `=` | Select the next key |
304 | | `Esc` | Quit mutiple cursors |
305 |
306 |
307 |
308 |
309 |
310 |
311 | #### [vim-surround](https://github.com/tpope/vim-surround)
312 | To add surround (`string` -> `"string"`):
313 | ```
314 | string
315 | ```
316 | press: `yskw'`:
317 | ```
318 | 'string'
319 | ```
320 |
321 | To change surround
322 | ```
323 | 'string'
324 | ```
325 | press: `cs'"`:
326 | ```
327 | "string"
328 | ```
329 |
330 |
331 |
332 | #### [vim-subversive](https://github.com/svermeulen/vim-subversive)
333 | New operator: `s`:
334 |
335 | You can execute `s` to substitute the text object provided by the motion with the contents of the default register (or an explicit register if provided). For example, you could execute `skw` to replace the current word under the cursor with the current yank, or `skp` to replace the paragraph, etc.
336 |
337 | #### [vim-easy-align](https://github.com/junegunn/vim-easy-align)
338 | Press `ga` + **symbol** in normal or visual mode to align text based on **symbol**
339 |
340 |
341 |
342 | #### [AutoFormat](https://github.com/Chiel92/vim-autoformat)
343 | Press `\` `f` to format code
344 |
345 | #### [vim-markdown-toc (generate table of contents for markdown files)](https://github.com/mzlogin/vim-markdown-toc)
346 | In `markdown` files, type `:Gen` then tab, you'll see your options.
347 |
348 |
349 |
350 | ### Navigation Within Buffer
351 | #### [Vista.vim](https://github.com/liuchengxu/vista.vim)
352 | Press `T` to toggle function and variable list
353 |
354 |
355 |
356 | ### Find and Replace
357 | #### [Far.vim - find and replace](https://github.com/brooth/far.vim)
358 | Press `SPACE` `f` `r` to search in cwd.
359 |
360 |
361 |
362 | ### Git Related
363 | #### [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
364 | | Shortcut | Action |
365 | |-----------------|-----------------------------------|
366 | | `H` | **Show git hunk at current line** |
367 | | `SPACE` `g` `-` | Go to previous git hunk |
368 | | `SPACE` `g` `+` | Go to next git hunk |
369 | | `SPACE` `g` `f` | Fold everything except hunks |
370 |
371 | #### [fzf-gitignore](https://github.com/fszymanski/fzf-gitignore)
372 | Press `Space` `g` `i` to create a `.gitignore` file
373 |
374 |
375 |
376 |
377 |
378 | ### Others
379 | #### [vim-calendar](https://github.com/itchyny/calendar.vim)
380 | | Shortcut | Action |
381 | |----------|---------------|
382 | | `\` `\` | Show clock |
383 | | `\` `c` | Show calendar |
384 |
385 |
386 |
387 | #### [Goyo - Work without distraction](https://github.com/junegunn/goyo.vim)
388 | Press `g` `y` to toggle Goyo
389 |
390 |
391 |
392 | #### [suda.vim](https://github.com/lambdalisue/suda.vim)
393 | Forgot to `sudo vim ...`? Just do `:sudowrite` or `:sw`
394 |
395 | #### [coc-translator](https://github.com/voldikss/coc-translator)
396 | Press `ts` to **translate word under cursor**.
397 |
398 |
399 |
400 | ## Custom Snippets
401 | ### Markdown
402 | | Shortcut | What it creates |
403 | |----------|---------------------|
404 | | `,n` | --- |
405 | | `,b` | **Bold** text |
406 | | `,s` | ~~sliced~~ text |
407 | | `,i` | *italic* text |
408 | | `,d` | `code block` |
409 | | `,c` | big `block of code` |
410 | | `,m` | - [ ] check mark |
411 | | `,p` | picture |
412 | | `,a` | [link]() |
413 | | `,1` | # H1 |
414 | | `,2` | ## H2 |
415 | | `,3` | ### H3 |
416 | | `,4` | #### H4 |
417 | | `,l` | -------- |
418 |
419 | `,f` to go to the next `<++>` (placeholder)
420 |
421 | `,w` to go to the next `<++>` (placeholder) and then press `Enter` for you
422 |
423 | ## Some Weird Stuff
424 | ### Press `tx` and enter your text
425 | `tx Hello`
426 | ```
427 | _ _ _ _
428 | | | | | ___| | | ___
429 | | |_| |/ _ \ | |/ _ \
430 | | _ | __/ | | (_) |
431 | |_| |_|\___|_|_|\___/
432 | ```
433 |
434 | ### Customized Vertical Cursor Movement
435 |
436 | This NeoVim configuration includes a customized vertical cursor movement tailored for Colemak users. It can be located in `cursor.vim`, and it serves as an alternative to the "number + up/down" key combination.
437 |
438 | In order to move the cursor up `x` lines, press the `[` key, and treat the middle row of the Colemak keyboard layout ("arstdhneio") as number 1 to 0. Press the numbers that you'd like your cursor to move (`x`) and press the space bar.
439 |
440 | To move the cursor down, press the `'` key instead of the `[` key, and the rest would be the same.
441 |
442 | Example:
443 | | Shortcut | Action |
444 | |-------------------------|--------------------------------|
445 | | `[` `a` `o` `o` `SPACE` | Move the cursor up 100 lines |
446 | | `'` `a` `r` `s` `SPACE` | Move the cursor down 123 lines |
447 | | `[` `d` `o` `SPACE` | Move the cursor up 50 lines |
448 |
449 | **Note: As of now, you may only move vertically up to 199 lines with this key configuration!**
450 |
451 |
--------------------------------------------------------------------------------
/README_cn.md:
--------------------------------------------------------------------------------
1 | ## [Colemak](https://colemak.com/) 用户使用的 [NeoVim](https://neovim.io) 配置文件
2 |
3 |
4 |
5 | [English Version](./README.md)
6 |
7 | 请不要只复制这份配置文件夹而不认真看它!请至少阅读一下这份自述文件!
8 |
9 | ---
10 |
11 | 第一版翻译: [**EvanMeek**](https://github.com/EvanMeek)
12 |
13 | 第二版翻译 (当前版本): [**KiteAB**](https://github.com/KiteAB)
14 |
15 |
16 |
17 | * [安装此配置后你需要做的事](#安装此配置后你需要做的事)
18 | * [安装此配置后你可能想做的事](#安装此配置后你可能想做的事)
19 | - [首先](#首先)
20 | - [Python 程序调试 (通过 `vimspector` 实现)](#python-程序调试-通过-vimspector-实现)
21 | - [配置 `Python` 路径](#配置-python-路径)
22 | - [标签表](#标签表)
23 | - [FZF](#fzf)
24 | - [其它...](#其它)
25 | * [快捷键](#快捷键)
26 | - [1 基础编辑器特性](#1-基础编辑器特性)
27 | + [1.1 最基本的键位](#11-最基本的键位)
28 | + [1.2 改变了的光标移动方式](#12-改变了的光标移动方式)
29 | + [1.3 改变了插入模式的键位](#13-改变了插入模式的键位)
30 | + [1.4 改变了在普通模式下的操作键位](#14-改变了在普通模式下的操作键位)
31 | + [1.5 其它在普通模式下有用的键位](#15-其它在普通模式下有用的键位)
32 | + [1.6 增加了在可视模式下的命令](#16-增加了在可视模式下的命令)
33 | - [2 窗口管理](#2-窗口管理)
34 | + [2.1 通过分裂屏幕创造窗口](#21-通过分裂屏幕创造窗口)
35 | + [2.2 切换不同的窗口](#22-切换不同的窗口)
36 | + [2.3 为不同的窗口调整大小](#23-为不同的窗口调整大小)
37 | + [2.4 关闭窗口](#24-关闭窗口)
38 | - [3 标签页管理](#3-标签页管理)
39 | - [4 终端键盘快捷键](#4-终端键盘快捷键)
40 | * [插件快捷键 (截图/动图已经准备好!)](#插件快捷键-截图动图已经准备好)
41 | - [自动补全](#自动补全)
42 | + [COC (自动补全)](#coc-自动补全)
43 | + [Ultisnips](#ultisnips)
44 | - [代码调试](#代码调试)
45 | + [vimspector (代码调试插件)](#vimspector-代码调试插件)
46 | - [文件浏览](#文件浏览)
47 | + [coc-explorer - 文件浏览器](#coc-explorer---文件浏览器)
48 | + [rnvimr - 文件浏览器](#rnvimr---文件浏览器)
49 | + [FZF - 模糊文件查找器](#fzf---模糊文件查找器)
50 | + [xtabline - 精致的顶栏](#xtabline---精致的顶栏)
51 | - [文字编辑](#文字编辑)
52 | + [vim-table-mode](#vim-table-mode)
53 | + [Undotree](#undotree)
54 | + [vim-multiple-cursors](#vim-multiple-cursors)
55 | + [vim-surround](#vim-surround)
56 | + [vim-subversive](#vim-subversive)
57 | + [vim-easy-align](#vim-easy-align)
58 | + [AutoFormat](#autoformat)
59 | + [vim-markdown-toc (为 Markdown 文件生成目录)](#vim-markdown-toc-为-markdown-文件生成目录)
60 | - [缓冲区内导航](#缓冲区内导航)
61 | + [vim-easy-motion](#vim-easy-motion)
62 | + [Vista.vim](#vistavim)
63 | + [vim-signiture - 书签](#vim-signiture---书签)
64 | - [查找与替换](#查找与替换)
65 | + [Far.vim - 查找与替换](#farvim---查找与替换)
66 | - [Git 相关](#git-相关)
67 | + [vim-gitgutter](#vim-gitgutter)
68 | + [fzf-gitignore](#fzf-gitignore)
69 | - [其它](#其它-1)
70 | + [vim-calendar](#vim-calendar)
71 | + [Goyo - 不会分心地工作](#goyo---不会分心地工作)
72 | + [suda.vim](#sudavim)
73 | + [coc-translator](#coc-translator)
74 | * [自定义代码片段补全](#自定义代码片段补全)
75 | - [Markdown](#markdown)
76 | * [一些奇怪的东西](#一些奇怪的东西)
77 | - [按 `tx` 然后输入你想要的文字](#按-tx-然后输入你想要的文字)
78 | - [自定义垂直光标移动](#自定义垂直光标移动)
79 |
80 |
81 |
82 | ## 安装此配置后你需要做的事
83 | - [ ] 安装 `pynvim` (使用 `pip`)
84 | - [ ] 安装 `nodejs`, 然后在终端输入 `npm install -g neovim`
85 | - [ ] 安装 nerd-fonts (尽管它是可选的,但是安装之后看上去十分地酷)
86 |
87 | ## 安装此配置后你可能想做的事
88 | ### 首先
89 | - [ ] 执行 `:checkhealth`
90 |
91 | ### Python 程序调试 (通过 `vimspector` 实现)
92 | - [ ] 安装 `debugpy` (使用 `pip`)
93 |
94 | ### 配置 `Python` 路径
95 | - [ ] 确保你安装了 Python
96 | - [ ] 查看 `_machine_specific.vim` 文件
97 |
98 | ### 标签表
99 | - [ ] 安装 `ctags` 以获得类/函数/变量的三重支持
100 |
101 | ### FZF
102 | - [ ] 安装 `fzf`
103 | - [ ] 安装 `ag` (`the_silver_searcher` 需要)
104 |
105 | ### 其它...
106 | - [ ] 安装 `figlet` 以输入 ASCII 艺术字
107 | - [ ] 安装 `xclip` 以获得系统剪切板访问支持 (仅 `Linux` 与 `xorg` 需要)
108 |
109 | ## 快捷键
110 | ### 1 基础编辑器特性
111 | #### 1.1 最基本的键位
112 | **`k`** : 切换至 **`插入`** : 一种模式 (在原版 Vim 中与 `i` 键相同)
113 |
114 | **`Q`** : 退出当前 Vim 窗口 (在原版 Vim 中与命令 `:q` 相同)
115 |
116 | **`S`** : 保存当前文件 (在原版 Vim 中与命令 `:w` 相同)
117 |
118 | **_重要_**
119 |
120 | 因为 `i` 键被改为了 `k` 键, 所有包含 `i` 键的命令都必须将 `i` 改为 `k` (比如 `ciw` 应被更正为 `ckw`)
121 |
122 | #### 1.2 改变了的光标移动方式
123 | | 快捷键 | 行为 | 等于 (QWERTY 键盘布局中的哪些键) |
124 | |------------|--------------------------------|----------------------------------|
125 | | `u` | 将光标向上移动一行 | `k` |
126 | | `e` | 将光标向下移动一行 | `j` |
127 | | `n` | 将光标向左移动一格 | `h` |
128 | | `i` | 将光标向右移动一格 | `l` |
129 | | `U` | 将光标向上移动五行 | `5k` |
130 | | `E` | 将光标向下移动五行 | `5j` |
131 | | `N` | 将光标移至当前行的第一个字符 | `0` |
132 | | `I` | 将光标移至当前行的最后一个字符 | `$` |
133 | | `Ctrl` `u` | 将视角向上移动五行而不移动光标 | `Ctrl` `y` |
134 | | `Ctrl` `e` | 将视角向下移动五行而不移动光标 | `Ctrl` `e` |
135 | | `h` | 将光标移至当前单词的末尾 | `e` |
136 | | `W` | 将光标移至五个单词后的末尾 | `5w` |
137 | | `B` | 将光标移至五个单词前的开头 | `5b` |
138 |
139 | #### 1.3 改变了插入模式的键位
140 | | 快捷键 | 行为 |
141 | |------------|----------------------------------|
142 | | `Ctrl` `a` | 将光标移至当前行的末尾 |
143 | | `Ctrl` `u` | 将光标所在的字母移至当前行的末尾 |
144 |
145 | #### 1.4 改变了在普通模式下的操作键位
146 | | 快捷键 | 行为 |
147 | |-----------------|----------------------------------|
148 | | `l` | **撤销** |
149 | | `<` | 反向缩进 |
150 | | `>` | 缩进 |
151 | | `SPACE` `SPACE` | 删除下一个 `<++>` 并进入插入模式 |
152 |
153 | #### 1.5 其它在普通模式下有用的键位
154 | | 快捷键 | 行为 |
155 | |-----------------|--------------------------------|
156 | | `r` | **编译/运行当前文件** |
157 | | `SPACE` `s` `c` | 开关拼写检查 |
158 | | `SPACE` `d` `w` | 寻找近处的重复单词 |
159 | | `SPACE` `t` `t` | 将四个空格转换为制表符 |
160 | | `SPACE` `o` | 折叠代码 |
161 | | `SPACE` `-` | 上一个快速修复位置 |
162 | | `SPACE` `+` | 下一个快速修复位置 |
163 | | `\` `p` | 显示当前文件的路径 |
164 | | `SPACE` `/` | 在当前窗口下方新建一个终端窗口 |
165 |
166 | #### 1.6 增加了在可视模式下的命令
167 | | 快捷键 | 行为 |
168 | |--------|------------------------------|
169 | | `Y` | 复制选中文本至**系统剪切板** |
170 |
171 |
172 | ### 2 窗口管理
173 | #### 2.1 通过分裂屏幕创造窗口
174 | | 快捷键 | 行为 |
175 | |-------------|----------------------------------------|
176 | | `s` `u` | 新建一个分屏并把它放置在当前窗口的上面 |
177 | | `s` `e` | 新建一个分屏并把它放置在当前窗口的下面 |
178 | | `s` `n` | 新建一个分屏并把它放置在当前窗口的左边 |
179 | | `s` `i` | 新建一个分屏并把它放置在当前窗口的右边 |
180 | | `s` `v` | 将两个分屏垂直放置 |
181 | | `s` `h` | 将两个分屏水平放置 |
182 | | `s` `r` `v` | 将所有分屏垂直放置 |
183 | | `s` `r` `h` | 将所有分屏水平放置 |
184 |
185 | #### 2.2 切换不同的窗口
186 | | 快捷键 | 行为 |
187 | |---------------|----------------|
188 | | `SPACE` + `w` | 移至下一个窗口 |
189 | | `SPACE` + `n` | 移至左边的窗口 |
190 | | `SPACE` + `i` | 移至右边的窗口 |
191 | | `SPACE` + `u` | 移至上面的窗口 |
192 | | `SPACE` + `e` | 移至下面的窗口 |
193 |
194 | #### 2.3 为不同的窗口调整大小
195 | 用方向键更改当前窗口的大小
196 |
197 | #### 2.4 关闭窗口
198 | | 快捷键 | 行为 |
199 | |-------------|-------------------------------------------------------------|
200 | | `Q` | 关闭当前窗口 |
201 | | `SPACE` `q` | 关闭当前窗口下面的窗口 (如果下面没有窗口,则当前窗口将关闭) |
202 |
203 | ### 3 标签页管理
204 | | 快捷键 | 行为 |
205 | |-------------|--------------------------|
206 | | `t` `u` | 新建一个标签页 |
207 | | `t` `n` | 移至左侧标签页 |
208 | | `t` `i` | 移至右侧标签页 |
209 | | `t` `m` `n` | 将当前标签页向左移动一格 |
210 | | `t` `m` `i` | 将当前标签页向右移动一格 |
211 |
212 | ### 4 终端键盘快捷键
213 | | 快捷键 | 行为 |
214 | |------------|------------------|
215 | | `Ctrl` `n` | 退出终端输入模式 |
216 |
217 | ## 插件快捷键 (截图/动图已经准备好!)
218 | ### 自动补全
219 | #### [COC (自动补全)](https://github.com/neoclide/coc.nvim)
220 | | 快捷键 | 行为 |
221 | |-----------------|--------------------|
222 | | `Space` `y` | **打开剪切板历史** |
223 | | `gd` | 列出定义列表 |
224 | | `gr` | 列出参考列表 |
225 | | `gi` | 待办事项清单 |
226 | | `gy` | 转至类型定义 |
227 | | `Space` `r` `n` | 重命名变量 |
228 |
229 |
230 |
231 | #### [Ultisnips](https://github.com/SirVer/ultisnips)
232 | | 快捷键 | 行为 |
233 | |------------|--------------------------|
234 | | `Ctrl` `e` | 召唤一个代码片段 |
235 | | `Ctrl` `n` | 在一个代码片段中前移光标 |
236 | | `Ctrl` `e` | 在一个代码片段中后移光标 |
237 |
238 | 
239 |
240 | ### 代码调试
241 | #### [vimspector (代码调试插件)](https://github.com/puremourning/vimspector)
242 | | 快捷键 | 函数 |
243 | |--------|--------------------------------------------|
244 | | `F5` | 继续调试,如果不在一个调试中则开始进行调试 |
245 | | `F3` | 终止调试 |
246 | | `F4` | 用相同的配置重新开始调试 |
247 | | `F6` | 暂停调试 |
248 | | `F9` | 在当前行上切换行的断点 |
249 | | `F8` | 在光标下为表达式添加函数断点 |
250 | | `F10` | 完成步骤 |
251 | | `F11` | 下一步骤 |
252 | | `F12` | 退出当前函数范围 |
253 |
254 |
255 |
256 | ### 文件浏览
257 | #### [coc-explorer - 文件浏览器](https://github.com/weirongxu/coc-explorer)
258 | | 快捷键 | 行为 |
259 | |--------|-----------------------|
260 | | `tt` | **打开文件浏览器** |
261 | | `?` | 查看帮助 (在浏览器中) |
262 |
263 |
264 |
265 | #### [rnvimr - 文件浏览器](https://github.com/kevinhwang91/rnvimr)
266 | - [ ] 确定你已经安装了 ranger
267 |
268 | 按 `R` 键打开 ranger (文件选择器)
269 |
270 | 在 rnvimr (ranger) 中, 你可以:
271 | | 快捷键 | 行为 |
272 | |------------|----------------------|
273 | | `Ctrl` `t` | 在新标签页中打开文件 |
274 | | `Ctrl` `x` | 上下分裂打开当前文件 |
275 | | `Ctrl` `v` | 左右分裂打开所选文件 |
276 |
277 |
278 |
279 | #### [FZF - 模糊文件查找器](https://github.com/junegunn/fzf.vim)
280 | | 快捷键 | 行为 |
281 | |------------|------------------|
282 | | `Ctrl` `p` | **模糊查找文件** |
283 | | `Ctrl` `u` | 向上移动一格 |
284 | | `Ctrl` `e` | 向下移动一格 |
285 | | `Ctrl` `w` | 模糊查找缓冲区 |
286 | | `Ctrl` `f` | 模糊查找文件内容 |
287 | | `Ctrl` `h` | 模糊查找历史文件 |
288 | | `Ctrl` `t` | 模糊查找标签 |
289 |
290 |
291 |
292 | #### [xtabline - 精致的顶栏](https://github.com/mg979/vim-xtabline)
293 | | 快捷键 | 行为 |
294 | |--------|--------------------|
295 | | `to` | 开关循环标签页模式 |
296 | | `\p` | 显示当前路径 |
297 |
298 |
299 |
300 | ### 文字编辑
301 | #### [vim-table-mode](https://github.com/dhruvasagar/vim-table-mode)
302 | | 快捷键 | 行为 |
303 | |-----------------|--------------|
304 | | `SPACE` `t` `m` | 开关表格模式 |
305 | | `SPACE` `t` `r` | 重组表格 |
306 |
307 | See `:help table-mode.txt` for more.
308 |
309 | #### [Undotree](https://github.com/mbbill/undotree)
310 | | 快捷键 | 行为 |
311 | |---------------|--------------|
312 | | `Shift` + `L` | 打开撤回历史 |
313 | | `u` | 更新的记录 |
314 | | `e` | 更老的记录 |
315 |
316 |
317 |
318 | #### [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors)
319 | | 快捷键 | 行为 |
320 | |------------|-----------------------------|
321 | | `Ctrl`+`k` | **选择下一个键 (多重光标)** |
322 | | `Alt`+`k` | **选择所有键 (多重光标)** |
323 | | `Ctrl`+`p` | 选择上一个键 |
324 | | `Ctrl`+`s` | 跳过键 |
325 | | `Esc` | 退出多重光标 |
326 |
327 |
328 |
329 |
330 |
331 |
332 | #### [vim-surround](https://github.com/tpope/vim-surround)
333 | 想要添加包裹符号 (`string` -> `"string"`):
334 | ```
335 | string
336 | ```
337 | 按下: `yskw'`:
338 | ```
339 | 'string'
340 | ```
341 | 想要修改包裹符号
342 | ```
343 | 'string'
344 | ```
345 | 按下: `cs'"`:
346 | ```
347 | "string"
348 | ```
349 |
350 |
351 |
352 | #### [vim-subversive](https://github.com/svermeulen/vim-subversive)
353 | 新的操作员: `s`:
354 |
355 | 您可以执行 `s<操作>`来使用用默认的寄存器 (或提供的显式寄存器) 的内容替换运动提供的文本对象。例如,您可以执行 `skw` 将光标下的当前单词替换为当前yank,或执行 `skp` 替换段落,依此类推
356 |
357 |
358 | #### [vim-easy-align](https://github.com/junegunn/vim-easy-align)
359 | 在普通或可视模式下按 `ga` + **符号** 可以根据 **符号**对齐文本
360 |
361 |
362 |
363 | #### [AutoFormat](https://github.com/Chiel92/vim-autoformat)
364 | 按 `\` `f` 开启格式化模式
365 |
366 | #### [vim-markdown-toc (为 Markdown 文件生成目录)](https://github.com/mzlogin/vim-markdown-toc)
367 | 在 `Markdown` 文件中, 按下 `:Gen` 打开菜单,你将会看到可选选项
368 |
369 |
370 |
371 | ### 缓冲区内导航
372 | #### [vim-easy-motion](https://github.com/easymotion/vim-easymotion)
373 | 按 `'` 键和一个 `字母` 跳转至 `字母` (类似 Emacs 的 [AceJump](https://www.emacswiki.org/emacs/AceJump))
374 |
375 |
376 |
377 | #### [Vista.vim](https://github.com/liuchengxu/vista.vim)
378 | 按 `T` 打开函数与变量列表
379 |
380 |
381 |
382 | #### [vim-signiture - 书签](https://github.com/kshenoy/vim-signature)
383 | | 快捷键 | 行为 |
384 | |-------------|----------------------------|
385 | | `m` | 在当前行添加或删除书签 |
386 | | `m/` | 列出所有书签 |
387 | | `mSPACE` | 在缓冲区中跳转到下一个书签 |
388 | | `mt` | 在当前行添加或删除书签 |
389 | | `ma` | 在当前行添加注释 |
390 | | `ml` | 显示所有的书签 |
391 | | `mi` | 下一个书签 |
392 | | `mn` | 上一个书签 |
393 | | `mC` | 清除一个书签 |
394 | | `mX` | 清除所有书签 |
395 | | `mu` | 将书签往上提一行 |
396 | | `me` | 将书签往下拉一行 |
397 | | `SPC` `g` | 将书签移至任意行 |
398 |
399 |
400 |
401 | ### 查找与替换
402 | #### [Far.vim - 查找与替换](https://github.com/brooth/far.vim)
403 | 按下 `SPACE` `f` `r` 在工作目录中搜索
404 |
405 |
406 |
407 | ### Git 相关
408 | #### [vim-gitgutter](https://github.com/airblade/vim-gitgutter)
409 | | 快捷键 | 行为 |
410 | |-----------------|-----------------------------|
411 | | `H` | **在当前行显示 Git 代码块** |
412 | | `SPACE` `g` `-` | 去往上一个 Git 代码块 |
413 | | `SPACE` `g` `+` | 去往下一个 Git 代码块 |
414 | | `SPACE` `g` `f` | 折叠所有除代码块以外的行 |
415 |
416 | #### [fzf-gitignore](https://github.com/fszymanski/fzf-gitignore)
417 | 按 `Space` `g` `i` 来创建一个 `.gitignore` 文件
418 |
419 |
420 |
421 |
422 |
423 | ### 其它
424 | #### [vim-calendar](https://github.com/itchyny/calendar.vim)
425 | | 快捷键 | 行为 |
426 | |---------|----------|
427 | | `\` `\` | 显示时钟 |
428 | | `\` `c` | 显示日历 |
429 |
430 |
431 |
432 | #### [Goyo - 不会分心地工作](https://github.com/junegunn/goyo.vim)
433 | 按下 `g` `y` 开关 Goyo
434 |
435 |
436 |
437 | #### [suda.vim](https://github.com/lambdalisue/suda.vim)
438 | 想要忘记以前痛苦的 `sudo vim ...`? 只需要在 Vim 中执行 `:sudowrite` 或者 `:sw`
439 |
440 | #### [coc-translator](https://github.com/voldikss/coc-translator)
441 | 按下 `ts` 来 **翻译光标所在的单词**.
442 |
443 |
444 |
445 | ## 自定义代码片段补全
446 | ### Markdown
447 | | 快捷键 | 创建的文字 |
448 | |--------|------------------|
449 | | `,n` | --- |
450 | | `,b` | **粗体**文字 |
451 | | `,s` | ~~被划去~~的文字 |
452 | | `,i` | *斜体*文字 |
453 | | `,d` | `代码块` |
454 | | `,c` | 大的 `代码块` |
455 | | `,m` | - [ ] 清单 |
456 | | `,p` | 图片 |
457 | | `,a` | [链接]() |
458 | | `,1` | # H1 |
459 | | `,2` | ## H2 |
460 | | `,3` | ### H3 |
461 | | `,4` | #### H4 |
462 | | `,l` | -------- |
463 |
464 | `,f` 去往下一个 `<++>` (占位符)
465 |
466 | `,w` 去往下一个 `<++>` (占位符) 并帮你按下 `Enter`
467 |
468 | ## 一些奇怪的东西
469 | ### 按 `tx` 然后输入你想要的文字
470 | `tx Hello`
471 | ```
472 | _ _ _ _
473 | | | | | ___| | | ___
474 | | |_| |/ _ \ | |/ _ \
475 | | _ | __/ | | (_) |
476 | |_| |_|\___|_|_|\___/
477 | ```
478 |
479 | ### 自定义垂直光标移动
480 |
481 | 此 NeoVim 配置包含了一套对 Colemak 用户量身定制的垂直光标移动, 它位于 `cursor.vim` 中, 并且可以替代 “数字 + 上 / 下” 的案件组合
482 |
483 | 为了将光标向上移至 `x` 行, 可以按下 `[` 键, 并将 Colemak 键盘布局的中间行 (“arstdhneio”) 视为从 1 到 0 的数字, 按所需的数字, 再按下空格键以跳转至 `x` 行之上
484 |
485 | 要向下移动光标, 按 `'` 键而不是 `[` 键, 其余部分相同
486 |
487 | 例:
488 | | 快捷键 | 行为 |
489 | | ----------------------- | --------------------- |
490 | | `[` `a` `o` `o` `SPACE` | 将光标向上移动 100 行 |
491 | | `'` `a` `r` `s` `SPACE` | 将光标向下移动123行 |
492 | | `[` `d` `o` `SPACE` | 将光标向上移动50行 |
493 |
494 | **注意: 目前, 使用此移动方式, 你最多只能垂直移动 199 行!**
495 |
--------------------------------------------------------------------------------
/Ultisnips/README.md:
--------------------------------------------------------------------------------
1 | # These are custom snippets that suit my needs
2 |
--------------------------------------------------------------------------------
/Ultisnips/c.snippets:
--------------------------------------------------------------------------------
1 | snippet cm "Comment Section"
2 | /* ${0} */
3 | endsnippet
4 |
5 | snippet st "printf"
6 | printf(${0});
7 | endsnippet
8 |
9 | snippet inc "Includes"
10 | #include
11 | #include
12 |
13 | endsnippet
14 |
--------------------------------------------------------------------------------
/Ultisnips/cs.snippets:
--------------------------------------------------------------------------------
1 | snippet main "Public main class"
2 | public static void Main()
3 | {
4 | System.Console.WriteLine("Hello");
5 | }
6 |
7 | endsnippet
8 |
9 | snippet st "println"
10 | System.Console.WriteLine(${0});
11 | endsnippet
12 |
--------------------------------------------------------------------------------
/Ultisnips/dart.snippets:
--------------------------------------------------------------------------------
1 | snippet imat "Import Material"
2 | import 'package:flutter/material.dart';
3 |
4 | endsnippet
5 |
6 | snippet context "BuildContext" i
7 | BuildContext context
8 | endsnippet
9 |
10 | snippet fn "Async Function"
11 | void ${1:func}() {
12 | ${0}
13 | }
14 |
15 | endsnippet
16 |
17 | snippet afn "Async Function"
18 | Future ${1:func}() async {
19 | ${0}
20 | }
21 | endsnippet
22 |
23 | snippet wfunc "Widget Function"
24 | Widget build${1:Widget}() {
25 | return ${0:Container()};
26 | }
27 | endsnippet
28 |
29 | snippet el "} else {"
30 | } else {
31 | endsnippet
32 |
33 | snippet elif "} else if () {"
34 | } else if (${0}) {
35 | endsnippet
36 |
37 | snippet msa "MaterialStateProperty.all"
38 | MaterialStateProperty.all(${0}),
39 | endsnippet
40 |
41 | snippet msr "MaterialStateProperty.resolveWith"
42 | MaterialStateProperty.resolveWith<${1}>((states) => states.contains(MaterialState.pressed) ? null : null),
43 | endsnippet
44 |
45 | snippet wh "Width and height"
46 | width: ${1},
47 | height: ${0},
48 | endsnippet
49 |
50 | snippet iwh "Infinity Width and height"
51 | width: double.infinity,
52 | height: double.infinity,
53 | endsnippet
54 |
55 | snippet oprs "onPressed"
56 | final void Function() onPressed;
57 | endsnippet
58 |
59 | snippet pa "Padding"
60 | padding: EdgeInsets.only(${1:left: ${2:0}}${3:, right: ${4:0}}${5:, top: ${6:0}}${7:, bottom: ${8:0}}),
61 | endsnippet
62 |
63 | snippet paa "Padding All"
64 | padding: EdgeInsets.all(${1:8.0}),
65 | endsnippet
66 |
67 | snippet pah "Padding Horizontal"
68 | padding: EdgeInsets.symmetric(horizontal: ${0:0}),
69 | endsnippet
70 |
71 | snippet pav "Padding Vertical"
72 | padding: EdgeInsets.symmetric(vertical: ${0:0}),
73 | endsnippet
74 |
75 | snippet pat "Padding Top"
76 | padding: EdgeInsets.only(top: ${0:0}),
77 | endsnippet
78 |
79 | snippet pab "Padding Bottom"
80 | padding: EdgeInsets.only(bottom: ${0:0}),
81 | endsnippet
82 |
83 | snippet pal "Padding Left"
84 | padding: EdgeInsets.only(left: ${0:0}),
85 | endsnippet
86 |
87 | snippet par "Padding Right"
88 | padding: EdgeInsets.only(right: ${0:0}),
89 | endsnippet
90 |
91 | snippet mar "Margin"
92 | margin: EdgeInsets.only(${1:left: ${2:0}}${3:, right: ${4:0}}${5:, top: ${6:0}}${7:, bottom: ${8:0}}),
93 | endsnippet
94 |
95 | snippet mara "Margin All"
96 | margin: EdgeInsets.all(${1:8.0}),
97 | endsnippet
98 |
99 | snippet marh "Margin Horizontal"
100 | margin: EdgeInsets.symmetric(horizontal: ${0:0}),
101 | endsnippet
102 |
103 | snippet marv "Margin Vertical"
104 | margin: EdgeInsets.symmetric(vertical: ${0:0}),
105 | endsnippet
106 |
107 | snippet mart "Margin Top"
108 | margin: EdgeInsets.only(top: ${0:0}),
109 | endsnippet
110 |
111 | snippet marb "Margin Bottom"
112 | margin: EdgeInsets.only(bottom: ${0:0}),
113 | endsnippet
114 |
115 | snippet marl "Margin Left"
116 | margin: EdgeInsets.only(left: ${0:0}),
117 | endsnippet
118 |
119 | snippet marr "Margin Right"
120 | margin: EdgeInsets.only(right: ${0:0}),
121 | endsnippet
122 |
123 | snippet marv "Margin Vertical"
124 | margin: EdgeInsets.only(top: ${1:0}, bottom: ${1}),${0}
125 | endsnippet
126 |
127 | snippet br "BorderRadius"
128 | borderRadius: BorderRadius.all(Radius.circular(${0})),
129 | endsnippet
130 |
131 | snippet sbr "Shape with BorderRadius"
132 | shape: RoundedRectangleBorder(
133 | borderRadius: BorderRadius.all(Radius.circular(${0})),
134 | ),
135 | endsnippet
136 |
137 | snippet dur "Duration"
138 | duration: const Duration(milliseconds: ${0}),
139 | endsnippet
140 |
141 | snippet dec "BoxDecoration"
142 | decoration: BoxDecoration(
143 | color: ${1},
144 | ),${0}
145 | endsnippet
146 |
147 | snippet ba "BorderRadius"
148 | border: Border.all(
149 | width: ${1},
150 | color: ${2},
151 | ),
152 | endsnippet
153 |
154 | snippet mai "MainAxis"
155 | mainAxisAlignment: MainAxisAlignment.${0}
156 | endsnippet
157 |
158 | snippet crs "CrossAxis"
159 | crossAxisAlignment: CrossAxisAlignment.${0}
160 | endsnippet
161 |
162 | snippet mainmin "MainAxisSize.min"
163 | mainAxisSize: MainAxisSize.min
164 | endsnippet
165 |
166 | snippet row "Row"
167 | Row(children: [
168 | ${0}
169 | ]),
170 | endsnippet
171 |
172 | snippet rowa "Row with alignment"
173 | Row(
174 | mainAxisAlignment: MainAxisAlignment.${1:start},
175 | crossAxisAlignment: CrossAxisAlignment.${2:start},
176 | children: [
177 | ${0}
178 | ],
179 | ),
180 | endsnippet
181 |
182 | snippet col "Column"
183 | Column(children: [
184 | ${0}
185 | ]),
186 | endsnippet
187 |
188 | snippet cola "Column with alignment"
189 | Column(
190 | mainAxisAlignment: MainAxisAlignment.${1:start},
191 | crossAxisAlignment: CrossAxisAlignment.${2:start},
192 | children: [
193 | ${0}
194 | ],
195 | ),
196 | endsnippet
197 |
198 | snippet sta "Stack"
199 | Stack(children: [
200 | ${0}
201 | ]),
202 | endsnippet
203 |
204 | snippet cs "const SizedBox()"
205 | const SizedBox()${0}
206 | endsnippet
207 |
208 | snippet co "Container"
209 | Container()${0}
210 | endsnippet
211 |
212 | snippet con "Container"
213 | Container(
214 | child: ${0},
215 | )
216 | endsnippet
217 |
218 | snippet exp "Expanded"
219 | Expanded(
220 | child: ${0},
221 | ),
222 | endsnippet
223 |
224 | snippet flx "Flexible"
225 | Flexible(
226 | child: ${0},
227 | ),
228 | endsnippet
229 |
230 | snippet cons "Container Sized"
231 | Container(
232 | width: ${1},
233 | height: ${2},
234 | child: ${0},
235 | )
236 | endsnippet
237 |
238 | snippet cen "Center"
239 | Center(child: ${0})
240 | endsnippet
241 |
242 | snippet t "Text"
243 | Text("${1}"),${0}
244 | endsnippet
245 |
246 | snippet ts "Text with text style"
247 | Text(${1}, style: ${2}),${0}
248 | endsnippet
249 |
250 | snippet rts "Rich Text with text style"
251 | RichText(
252 | text: TextSpan(children: [
253 | TextSpan(text: ${1}, style: ${2}),${0}
254 | ]),
255 | ),
256 | endsnippet
257 |
258 | snippet ss "TextStyle"
259 | TStyle(c: ${1}, s: ${2:14}, w: F.w${3:5})${0}
260 | endsnippet
261 |
262 |
263 | snippet nbuilder "NotifierBuilder"
264 | NotifierBuilder(
265 | notifier: null,
266 | builder: (context) {
267 | return Container();
268 | },
269 | )
270 | endsnippet
271 |
272 | snippet sw "SizedBox with width"
273 | const SizedBox(width: ${1}),${0}
274 | endsnippet
275 |
276 | snippet sh "SizedBox with height"
277 | const SizedBox(height: ${1}),${0}
278 | endsnippet
279 |
280 | snippet swh "SizedBox with width and height"
281 | SizedBox(width: ${1}, height: ${2}),${0}
282 | endsnippet
283 |
284 | snippet scaf "Scaffold"
285 | Scaffold(
286 | appBar: AppBar(
287 | title: Text('${1:Title}'),
288 | ),
289 | body: ${2:Container()}${0},
290 | );
291 | endsnippet
292 |
293 | snippet sf "New Stateful Widget" b
294 | class ${1:name} extends StatefulWidget {
295 | ${1:name}({super.key});
296 | @override
297 | _${1:WidgetName}State createState() => _${1:WidgetName}State();
298 | }
299 | class _${1:index}State extends State<${1:index}> {
300 | @override
301 | Widget build(context) {
302 | return ${2:Container()};
303 | }
304 | }
305 | endsnippet
306 |
307 |
308 | snippet sl "New Stateless Widget" b
309 | class ${1:name} extends StatelessWidget {
310 | ${1:name}({super.key});
311 | @override
312 | Widget build(context) {
313 | return ${2:Container()};
314 | }
315 | }
316 | endsnippet
317 |
318 | snippet wt "Colors.white"
319 | color: colorWhite,
320 | endsnippet
321 |
322 | snippet inits "initState"
323 | @override
324 | void initState() {
325 | ${0}
326 | super.initState();
327 | }
328 | endsnippet
329 |
330 | snippet dispose "dispose"
331 | @override
332 | void dispose() {
333 | ${0:}
334 | super.dispose();
335 | }
336 | endsnippet
337 |
338 | snippet listv "ListView.builder"
339 | ListView.builder(
340 | itemCount: ${1:1},
341 | itemBuilder: (context, index) {
342 | return ${2:Container()};
343 | },
344 | )
345 | endsnippet
346 |
347 | snippet future "Future Builder"
348 | FutureBuilder(
349 | future: ${1:Future},
350 | initialData: ${2:InitialData},
351 | builder: (context, snapshot) {
352 | if (snapshot.connectionState == ConnectionState.done)
353 | return ${3:Container();}
354 | return ${4:Container();}
355 | },
356 | )
357 | endsnippet
358 |
359 | snippet stream "Stream Builder"
360 | StreamBuilder<${1:dynamic}>(
361 | stream: ${2:yourStream},
362 | builder: (context, snapshot) {
363 | if (snapshot.hasData) {
364 | // TODO: do something with the data
365 | return ${3:Container()};
366 | } else if (snapshot.hasError) {
367 | // TODO: do something with the error
368 | return ${4:Text(snapshot.error.toString())};
369 | }
370 | // TODO: the data is not ready, show a loading indicator
371 | return ${5:Center(child: CircularProgressIndicator())};
372 | },
373 | ),
374 | endsnippet
375 |
376 | snippet try "try catch"
377 | try {
378 | ${0}
379 | } catch (e, stack) {
380 | print(e);
381 | print(stack);
382 | }
383 | endsnippet
384 |
385 | snippet for "standard for loop without brackets"
386 | for (var ${1:i} = 0; ${1:i} < ${2:n}; ++${1:i})
387 | ${3:// TODO}
388 | endsnippet
389 |
390 | snippet forr "standard for loop"
391 | for (var ${1:i} = 0; ${1:i} < ${2:n}; ++${1:i}) {
392 | ${3:// TODO}
393 | }
394 | endsnippet
395 |
396 | snippet fori "For in loop"
397 | for (var ${1:item} in ${2:object}) {
398 | ${3:// TODO}
399 | }
400 | endsnippet
401 |
402 | snippet ssm "Multi-line Set State"
403 | setState(() {
404 | ${1:// TODO}
405 | });
406 | endsnippet
407 |
408 | snippet sss "Single-line Set State"
409 | setState(() => ${1:/* TODO */} );
410 | endsnippet
411 |
412 | snippet sst "Empty Set State"
413 | setState(() {})${0}
414 | endsnippet
415 |
416 | snippet rf "Request focus"
417 | FocusScope.of(context).requestFocus(${1:FocusNode()})${0}
418 | endsnippet
419 |
420 | snippet rfn "Request focusnode (new)"
421 | FocusScope.of(context).requestFocus(FocusNode());
422 | endsnippet
423 |
424 | snippet push "Navigator push"
425 | Navigator.of(context).push(
426 | MaterialPageRoute(builder: (context) => ${1:Page()}),
427 | )${0}
428 | endsnippet
429 |
430 | snippet pop "Navigator pop"
431 | Navigator.of(context).pop(${1})${0}
432 | endsnippet
433 |
434 | snippet rmb "RawMaterialButton"
435 | RawMaterialButton(
436 | elevation: ${1:0},
437 | onPressed: () {},
438 | shape: RoundedRectangleBorder(
439 | borderRadius: BorderRadius.all(Radius.circular(${2:5})),
440 | ),
441 | fillColor: ${3:Colors.transparent},
442 | child: ${5:Container()},
443 | ),
444 | endsnippet
445 |
446 | snippet mo "Get MediaQuery"
447 | MediaQuery.of(context)${0}
448 | endsnippet
449 |
450 | snippet st "print();"
451 | print(${0});
452 | endsnippet
453 |
454 | snippet sbj "Behavior subject"
455 | Stream<${1:int}> get ${2:my}Stream => _${2:my}Subject.stream;
456 | BehaviorSubject<${1}> _${2:my}Subject;
457 | _${2:my}Subject = BehaviorSubject<${1}>();
458 | endsnippet
459 |
460 | snippet f "Function"
461 | () =>
462 | endsnippet
463 |
464 | snippet adelay "await Future.delayed"
465 | await Future.delayed(const Duration(milliseconds: ${1:300}));
466 | endsnippet
467 |
468 | snippet delay "Future.delayed"
469 | Future.delayed(const Duration(milliseconds: ${1:300})).then((_) {
470 | ${2}
471 | });
472 | endsnippet
473 |
474 | snippet now "DateTime.now()"
475 | DateTime.now()
476 | endsnippet
477 |
478 | snippet rt "required this."
479 | required this.${1}, ${0}
480 | endsnippet
481 |
482 | snippet posr "Positioned right"
483 | Positioned(
484 | top: ${1:0},
485 | right: ${2:0},
486 | bottom: ${3:0},
487 | child: ${0:Container()},
488 | ),
489 | endsnippet
490 |
491 | snippet posl "Positioned left"
492 | Positioned(
493 | top: ${1:0},
494 | left: ${2:0},
495 | bottom: ${3:0},
496 | child: ${0:Container()},
497 | ),
498 | endsnippet
499 |
500 | snippet post "Positioned top"
501 | Positioned(
502 | top: ${1:0},
503 | left: ${2:0},
504 | right: ${3:0},
505 | child: ${0:Container()},
506 | ),
507 | endsnippet
508 |
509 | snippet posb "Positioned bottom"
510 | Positioned(
511 | bottom: ${1:0},
512 | left: ${2:0},
513 | right: ${3:0},
514 | child: ${0:Container()},
515 | ),
516 | endsnippet
517 |
518 | snippet postr "Positioned top right"
519 | Positioned(
520 | top: ${1:0},
521 | right: ${2:0},
522 | child: ${3:Container()},
523 | ),
524 | endsnippet
525 |
526 | snippet posbl "Positioned bottom left"
527 | Positioned(
528 | bottom: ${1:0},
529 | left: ${2:0},
530 | child: ${3:Container()},
531 | ),
532 | endsnippet
533 |
534 | snippet posbr "Positioned bottom right"
535 | Positioned(
536 | bottom: ${1:0},
537 | right: ${2:0},
538 | child: ${3:Container()},
539 | ),
540 | endsnippet
541 |
542 | snippet postl "Positioned top left"
543 | Positioned(
544 | top: ${1:0},
545 | left: ${2:0},
546 | child: ${3:Container()},
547 | ),
548 | endsnippet
549 |
550 | snippet fa "fix add type"
551 | // TYPEADD
552 | endsnippet
553 |
554 | snippet .f "fix add type" i
555 | .forEach((${1:item}) {
556 | ${0:// TODO}
557 | });
558 | endsnippet
559 |
--------------------------------------------------------------------------------
/Ultisnips/go.snippets:
--------------------------------------------------------------------------------
1 | snippet checke "Check Error"
2 | if err != nil {
3 | return err
4 | }
5 | ${0}
6 | endsnippet
7 |
8 | snippet no "utils.NoError"
9 | if utils.NoError(err) {
10 | ${0}
11 | }
12 | endsnippet
13 |
14 | snippet forr "For loop range"
15 | for _, ${1:thing} := range ${2:things} {
16 | ${3://TODO}
17 | }
18 | endsnippet
19 |
20 | snippet fori "For loop i"
21 | for i := 0; i < n; i++ {
22 | ${1://TODO}
23 | }
24 | endsnippet
25 |
26 | snippet re "Return Error if any"
27 | if err != nil {
28 | return err
29 | }
30 | ${0}
31 | endsnippet
32 |
33 | snippet ie "Check Error"
34 | if err != nil {
35 | panic(err)
36 | }
37 | ${0}
38 | endsnippet
39 |
40 | snippet st "Println"
41 | fmt.Println(${1})${0}
42 | endsnippet
43 |
44 | snippet lt "Log Println"
45 | log.Println(${1})${0}
46 | endsnippet
47 |
48 | snippet sf "Printf"
49 | fmt.Printf("${1}\n")${0}
50 | endsnippet
51 |
52 | snippet lf "Log Printf"
53 | log.Printf("${1}\n")${0}
54 | endsnippet
55 |
56 | snippet fn "Function"
57 | func ${1:function}() {
58 | ${0: // todo}
59 | }
60 | endsnippet
61 |
62 | snippet lt "Log Println"
63 | log.Println(${1})${0}
64 | endsnippet
65 |
66 | snippet start "Starting code"
67 | package main
68 |
69 | import (
70 | "fmt"
71 | )
72 |
73 | func main() {
74 | fmt.Println("hello")
75 | }
76 | endsnippet
77 |
78 | snippet cq "Current Question"
79 | app.result.questions[app.curResultIndex]${0}
80 | endsnippet
81 |
82 | snippet fa "fix add type"
83 | // FIX:ADDTYPE
84 | endsnippet
85 |
--------------------------------------------------------------------------------
/Ultisnips/java.snippets:
--------------------------------------------------------------------------------
1 | snippet st "System.out.Println();"
2 | System.out.println(${0});
3 | endsnippet
4 |
5 |
--------------------------------------------------------------------------------
/Ultisnips/javascript.snippets:
--------------------------------------------------------------------------------
1 | snippet st "console.log"
2 | console.log(${0});
3 | endsnippet
4 |
5 | snippet fl "Firebase Function Log"
6 | /*LOG*/ functions.logger.log(${0});
7 | endsnippet
8 |
9 | snippet f "Arrow Function"
10 | (${1:arg}) => {
11 | ${0}
12 | }
13 | endsnippet
14 |
15 | snippet fn "Empty Function"
16 | function ${1:functionName}() {
17 | ${0}
18 | }
19 | endsnippet
20 |
21 | snippet cf "Constant Function"
22 | const ${1:funcName} = () => {
23 | ${0}
24 | }
25 | endsnippet
26 |
27 | snippet ef "Export Function"
28 | export function ${1:functionName}() {
29 | ${0}
30 | }
31 | endsnippet
32 |
33 | snippet eaf "Export Async Function"
34 | export async function ${1:functionName}() {
35 | ${0}
36 | }
37 | endsnippet
38 |
39 | snippet eafa "Export Async Function With Args"
40 | const ${1}DefaultArgs = {
41 | ${2}
42 | };
43 | export async function ${1:functionName}(options = ${1}DefaultArgs) {
44 | options = { ...${1}DefaultArgs, ...options };
45 | ${0:// todo}
46 | }
47 | endsnippet
48 |
49 | snippet ssr "NextJS ServerSide Rendering"
50 | export async function getServerSideProps() {
51 | return {
52 | props: {
53 | //
54 | },
55 | };
56 | }
57 | endsnippet
58 |
59 | snippet ssg "NextJS ServerSide Generation"
60 | export async function getStaticProps() {
61 | return {
62 | props: {
63 | //
64 | },
65 | };
66 | }
67 | endsnippet
68 |
69 | snippet rs "res.status"
70 | res.status(${1:200}).send("${2:text}")${0}
71 | endsnippet
72 |
73 | snippet af "Async Arrow Function"
74 | async (${1}) => {
75 | ${0}
76 | }
77 | endsnippet
78 |
79 | snippet afn "Async Function"
80 | async function ${1:FunctionName}() {
81 | ${0}
82 | }
83 | endsnippet
84 |
85 | snippet try "Try Catch"
86 | try {
87 | //
88 | } catch (e) {
89 | console.error(e);
90 | }
91 | endsnippet
92 |
93 | snippet eh "Error Handler"
94 | return await errorHandler(async () => {
95 | ${0:// Todo}
96 | });
97 | endsnippet
98 |
99 | snippet c "Comment Block"
100 | /*
101 | * ${0}
102 | */
103 | endsnippet
104 |
105 | snippet pm "@param"
106 | @param ${1:parameter}: ${0:description}
107 | endsnippet
108 |
109 | # React & JSX
110 |
111 | snippet t "Tag"
112 | <${1:div}>
113 | ${2}
114 | ${1}>
115 | ${0}
116 | endsnippet
117 |
118 | snippet ta "Tag with Attributes"
119 | <${1:div} ${2:className=""}>
120 | ${3}
121 | ${1}>
122 | ${0}
123 | endsnippet
124 |
125 | snippet ti "Tag Inline"
126 | <${1} />
127 | ${0}
128 | endsnippet
129 |
130 | snippet br "
"
131 |
132 | endsnippet
133 |
134 |
135 | snippet rrcc "React Redux Class Component" b
136 | import React, { Component } from 'react';
137 | import PropTypes from 'prop-types';
138 | import { connect } from 'react-redux';
139 | import styles from './${2:$1}.css';
140 |
141 | class ${1:`!v expand('%:t:r')`} extends Component {
142 | static propTypes = {
143 | children: PropTypes.node,
144 | className: PropTypes.string,
145 | dispatch: PropTypes.func.isRequired,
146 | };
147 |
148 | constructor(props) {
149 | super(props);
150 | }
151 |
152 | render() {
153 | return (
154 |
155 | $3
156 |
157 | );
158 | }
159 | }
160 |
161 | function mapStateToProps(state) {
162 | return {};
163 | }
164 |
165 | export default connect(mapStateToProps)($1);
166 | endsnippet
167 |
168 | snippet rcc "React Class Component" b
169 | import React, { Component } from 'react';
170 | import PropTypes from 'prop-types';
171 | import styles from './${2:$1}.css';
172 |
173 | class ${1:`!v expand('%:t:r')`} extends Component {
174 | static propTypes = {
175 | ${2:children: PropTypes.node,
176 | className: PropTypes.string,}
177 | };
178 |
179 | constructor(props) {
180 | super(props);
181 | }
182 |
183 | render() {
184 | return (
185 | <${3:div} className={styles.base}>
186 | $0
187 | $3>
188 | );
189 | }
190 | }
191 |
192 | export default $1;
193 | endsnippet
194 |
195 | snippet rfc "React Functional Component" b
196 | import React from 'react';
197 | import PropTypes from 'prop-types';
198 | import styles from './${2:$1}.css';
199 |
200 | function ${1:`!v expand('%:t:r')`}({ $3 }) {
201 | return (
202 | <${5:div} className={styles.base}>
203 | $0
204 | $5>
205 | );
206 | }
207 |
208 | $1.defaultProps = {$4};
209 |
210 | $1.propTypes = {`!p
211 | props = t[3]
212 | if props:
213 | snip >> 1
214 | for prop in props.split(', '):
215 | snip += prop + ': PropTypes.any,'
216 | `
217 | };
218 |
219 | export default $1;
220 | endsnippet
221 |
222 | snippet rsc "React Styled Component" b
223 | import styled from 'styled-components';
224 |
225 | const ${1:`!v expand('%:t:r')`} = styled.${2:div}\`
226 | $3
227 | \`;
228 |
229 | export default $1;
230 | endsnippet
231 |
232 | snippet rsci "React Styled Component Interpolation" b
233 | import styled, { css } from 'styled-components';
234 |
235 | const ${1:`!v expand('%:t:r')`} = styled.${2:div}\`${props => css\`
236 | ${3:${props.$4 && \`
237 | $5
238 | \`}}
239 | \`}\`;
240 |
241 | export default $1;
242 | endsnippet
243 |
244 | snippet pp "Get Props"
245 | ${props => props.${1}};
246 | endsnippet
247 |
248 | snippet cn "className"
249 | className="$1"
250 | endsnippet
251 |
252 | snippet dp "Default Props" b
253 | ${1:`!v expand('%:t:r')`.}defaultProps = {
254 | $2
255 | };
256 | endsnippet
257 |
258 | snippet set "Set State"
259 | this.setState({
260 | ${1}: ${2}
261 | });
262 | endsnippet
263 |
264 | snippet props "Get Property" i
265 | this.props.${1}
266 | endsnippet
267 |
268 | snippet state "Get State" i
269 | this.state.${1}
270 | endsnippet
271 |
272 | snippet ref "Ref" i
273 | ref={${1:ref} => { this.${2:name} = $1; }}
274 | endsnippet
275 |
276 |
277 | # Component Lifecycle
278 | snippet cwm "Component Will Mount" b
279 | componentWillMount() {
280 | $1
281 | }
282 | endsnippet
283 |
284 | snippet cdm "Component Did Mount" b
285 | componentDidMount() {
286 | $1
287 | }
288 | endsnippet
289 |
290 | snippet cwrp "Component Will Receive Props" b
291 | componentWillReceiveProps(nextProps) {
292 | $1
293 | }
294 | endsnippet
295 |
296 | snippet scup "Should Component Update" b
297 | shouldComponentUpdate(nextProps, nextState) {
298 | $1
299 | }
300 | endsnippet
301 |
302 | snippet cwup "Component Will Update" b
303 | componentWillUpdate(nextProps, nextState) {
304 | $1
305 | }
306 | endsnippet
307 |
308 | snippet cdup "Component Did Update" b
309 | componentDidUpdate(prevProps, prevState) {
310 | $1
311 | }
312 | endsnippet
313 |
314 | snippet cwu "Component Will Unmount" b
315 | componentWillUnmount() {
316 | $1
317 | }
318 | endsnippet
319 |
320 | snippet ren "Render"
321 | render() {
322 | return ${1:(
323 | ${2:${3}
}
324 | );}
325 | }
326 | endsnippet
327 |
328 |
329 | # PropTypes
330 | snippet pt "PropTypes Definition" b
331 | ${1:`!v expand('%:t:r')`.}propTypes = {
332 | ${2:className}: ${3:PropTypes.string},
333 | };
334 | endsnippet
335 |
336 | snippet pt.a "PropTypes Array" w
337 | PropTypes.array${1:,}
338 | endsnippet
339 |
340 | snippet pt.b "PropTypes Boolean" w
341 | PropTypes.bool${1:,}
342 | endsnippet
343 |
344 | snippet pt.f "PropTypes Function" w
345 | PropTypes.func${1:,}
346 | endsnippet
347 |
348 | snippet pt.n "PropTypes Number" w
349 | PropTypes.number${1:,}
350 | endsnippet
351 |
352 | snippet pt.o "PropTypes Object" w
353 | PropTypes.object${1:,}
354 | endsnippet
355 |
356 | snippet pt.s "PropType String" w
357 | PropTypes.string${1:,}
358 | endsnippet
359 |
360 | snippet pt.no "PropTypes Node" w
361 | PropTypes.node${1:,}
362 | endsnippet
363 |
364 | snippet pt.e "PropTypes Element" w
365 | PropTypes.element${1:,}
366 | endsnippet
367 |
368 | snippet pt.io "PropTypes instanceOf" w
369 | PropTypes.instanceOf(${2:PropTypes.string})${1:,}
370 | endsnippet
371 |
372 | snippet pt.one "PropTypes oneOf" w
373 | PropTypes.oneOf(['$2'$3])${1:,}
374 | endsnippet
375 |
376 | snippet pt.onet "PropTypes oneOfType" w
377 | PropTypes.oneOfType([
378 | $2
379 | ])${1:,}
380 | endsnippet
381 |
382 | snippet pt.ao "PropTypes arrayOf" w
383 | PropTypes.arrayOf(${2:PropTypes.string})${1:,}
384 | endsnippet
385 |
386 | snippet pt.oo "PropTypes objectOf" w
387 | PropTypes.objectOf(${2:PropTypes.string})${1:,}
388 | endsnippet
389 |
390 | snippet pt.sh "PropTyes Shape" w
391 | PropTypes.shape({
392 | $2
393 | })${1:,}
394 | endsnippet
395 |
396 | snippet ir "isRequired" w
397 | isRequired,
398 | endsnippet
399 |
400 | snippet rs "React useState"
401 | const [$1, set${1}] = useState(${0:''})
402 | endsnippet
403 |
404 | snippet test "Test"
405 | test("${1:test}", ${2:async}() => {
406 | ${3:// ...}
407 | });
408 | endsnippet
409 |
410 | snippet ex "Expect"
411 | expect(${1:1+1}).toBe(${2:2});
412 | endsnippet
413 |
414 |
415 | snippet route "New Route"
416 | import express from "express";
417 |
418 | const ${1:some}Routes = express.Router();
419 |
420 | ${0:// TODO}
421 |
422 | export default ${1:some}Routes;
423 | endsnippet
424 |
425 | snippet l "log"
426 | log(${0});
427 | endsnippet
428 |
429 | snippet ehs "errorHandlers.silent"
430 | await errorHandlers.silent(async () => {
431 | ${0:// todo}
432 | });
433 | endsnippet
434 |
435 | snippet eha "errorHandlers.safe"
436 | await errorHandlers.safe({
437 | action: async () => {
438 | ${0:// todo}
439 | },
440 | teardown: async () => {
441 | // todo
442 | },
443 | });
444 | endsnippet
445 |
--------------------------------------------------------------------------------
/Ultisnips/markdown.snippets:
--------------------------------------------------------------------------------
1 | snippet th "Table Heading"
2 | | ${1:Key} | ${2:Value} |
3 | |-|-|
4 | ${0}
5 | endsnippet
6 |
7 | snippet tr "Table Row"
8 | | ${1:Term} | ${2:Definition} |
9 | ${0}
10 | endsnippet
11 |
--------------------------------------------------------------------------------
/Ultisnips/python.snippets:
--------------------------------------------------------------------------------
1 | snippet st "print"
2 | print(${0})
3 | endsnippet
4 |
5 |
--------------------------------------------------------------------------------
/Ultisnips/racket.snippets:
--------------------------------------------------------------------------------
1 | snippet fn "Function"
2 | (define (${1:name} [${2:arg : Real}]) : Real
3 | ${0:(+ 1 1)})
4 | endsnippet
5 |
6 | snippet st "print();"
7 | (displayln ${0})
8 | endsnippet
9 |
10 |
--------------------------------------------------------------------------------
/Ultisnips/swift.snippets:
--------------------------------------------------------------------------------
1 | snippet st "print"
2 | print(${0})
3 | endsnippet
4 |
5 |
--------------------------------------------------------------------------------
/Ultisnips/tex.snippets:
--------------------------------------------------------------------------------
1 | # snip
2 | snippet mid "\mid \mid"
3 | \\mid ${1} \\mid ${0}
4 | endsnippet
5 |
6 | snippet srt "\sqrt{}"
7 | \\sqrt{${1}} ${0}
8 | endsnippet
9 |
10 |
--------------------------------------------------------------------------------
/Ultisnips/typescriptreact.snippets:
--------------------------------------------------------------------------------
1 | snippet ssg "NextJS ServerSide Generation"
2 | export async function getStaticProps() {
3 | return {
4 | props: {
5 | //
6 | },
7 | };
8 | }
9 | endsnippet
10 |
11 | snippet t "Tag"
12 | <${1:div}>
13 | ${2}
14 | ${1}>
15 | ${0}
16 | endsnippet
17 |
18 | snippet ta "Tag with Attributes"
19 | <${1:div} ${2:className=""}>
20 | ${3}
21 | ${1}>
22 | ${0}
23 | endsnippet
24 |
25 | snippet tn "Tag with class Names"
26 | <${1:div} className="${2}">
27 | ${0}
28 | ${1}>
29 | endsnippet
30 |
31 | snippet ti "Tag Inline"
32 | <${1} />
33 | ${0}
34 | endsnippet
35 |
36 | snippet br "
"
37 |
38 | endsnippet
39 |
--------------------------------------------------------------------------------
/Ultisnips/vim.snippets:
--------------------------------------------------------------------------------
1 | snippet sec "Comment Section"
2 | " ===
3 | " === ${1:New Section}
4 | " ===
5 | ${0}
6 | endsnippet
7 |
8 |
--------------------------------------------------------------------------------
/coc-settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "coc.preferences.semanticTokensHighlights": false,
3 | "coc.preferences.enableFloatHighlight": true,
4 | "coc.preferences.snippetStatusText": "Ⓢ ",
5 | "coc.preferences.extensionUpdateCheck": "daily",
6 | "coc.preferences.messageLevel": "error",
7 | "coc.source.around.firstMatch": false,
8 | "coc.source.buffer.firstMatch": false,
9 | "coc.source.syntax.firstMatch": false,
10 | "suggest.detailMaxLength": 60,
11 | "suggest.noselect": true,
12 | "suggest.enablePreselect": false,
13 | "suggest.triggerAfterInsertEnter": true,
14 | "suggest.autoTrigger": "always",
15 | "suggest.timeout": 5000,
16 | "suggest.enablePreview": true,
17 | "suggest.floatEnable": true,
18 | "suggest.detailField": "preview",
19 | "suggest.snippetIndicator": "",
20 | "suggest.triggerCompletionWait": 100,
21 | "suggest.echodocSupport": true,
22 | "suggest.completionItemKindLabels": {
23 | "class": "\uf0e8",
24 | "color": "\ue22b",
25 | "constant": "\uf8fe",
26 | "default": "\uf29c",
27 | "enum": "\uf435",
28 | "enumMember": "\uf02b",
29 | "event": "\ufacd",
30 | "field": "\uf93d",
31 | "file": "\uf723",
32 | "folder": "\uf115",
33 | "function": "\u0192",
34 | "interface": "\uf417",
35 | "keyword": "\uf1de",
36 | "method": "\uf6a6",
37 | "module": "\uf40d",
38 | "operator": "\uf915",
39 | "property": "\ue624",
40 | "reference": "\ufa46",
41 | "snippet": "\ue60b",
42 | "struct": "\ufb44",
43 | "text": "\ue612",
44 | "typeParameter": "\uf728",
45 | "unit": "\uf475",
46 | "value": "\uf89f",
47 | "variable": "\ue71b"
48 | },
49 | "diagnostic.signOffset": 1,
50 | "diagnostic.errorSign": "\uf467",
51 | "diagnostic.warningSign": "\uf071",
52 | "diagnostic.infoSign": "\uf129",
53 | "diagnostic.hintSign": "\uf864",
54 | "diagnostic.displayByAle": false,
55 | "diagnostic.refreshOnInsertMode": false,
56 | "diagnostic.checkCurrentLine": true,
57 | "diagnostic.virtualTextPrefix": " ❯❯❯ ",
58 | "diagnostic.virtualText": false,
59 | "codeLens.enable": true,
60 | "list.previewHighlightGroup": "Statement",
61 | "list.nextKeymap": "",
62 | "list.previousKeymap": "",
63 | "importCost.bundleSizeDecoration": "both",
64 | "importCost.typescriptExtensions": ["\\.tsx?$"],
65 | "importCost.javascriptExtensions": ["\\.jsx?$"],
66 | "importCost.showCalculatingDecoration": true,
67 | "importCost.debug": false,
68 | "snippets.ultisnips.directories": [
69 | "$HOME/.config/nvim/Ultisnips/",
70 | "$HOME/.config/nvim/plugged/vim-snippets/UltiSnips/"
71 | ],
72 | "coc.preferences.formatOnSaveFiletypes": [
73 | "javascript",
74 | "typescript",
75 | "typescriptreact",
76 | "html",
77 | "css",
78 | "json",
79 | "jsonc",
80 | "java",
81 | "python",
82 | "vue",
83 | "svelte",
84 | "c",
85 | "cpp",
86 | "cs",
87 | "racket",
88 | "prisma",
89 | "dart",
90 | "terraform"
91 | ],
92 | "yaml.format.enable": true,
93 | "signature.target": "float",
94 | "yank.enableCompletion": false,
95 | "typescript.suggestionActions.enabled": true,
96 | "typescript.format.enabled": true,
97 | "jest.watch": false,
98 | "explorer.width": 38,
99 | "explorer.quitOnOpen": true,
100 | "explorer.sources": [
101 | {
102 | "name": "buffer",
103 | "expand": false
104 | },
105 | {
106 | "name": "file",
107 | "expand": true
108 | }
109 | ],
110 | "explorer.file.column.indent.indentLine": true,
111 | "explorer.file.showHiddenFiles": true,
112 | "explorer.icon.enableNerdfont": true,
113 | "explorer.file.column.git.showIgnored": true,
114 | "explorer.keyMappingMode": "none",
115 | "explorer.buffer.showHiddenBuffers": false,
116 | "explorer.keyMappings.global": {
117 | "u": "nodePrev",
118 | "e": "nodeNext",
119 | "h": "toggleSelection",
120 | "": "actionMenu",
121 | "gl": "expandRecursive",
122 | "gh": "collapseRecursive",
123 | "i": ["wait", "expandable?", "expand", "open"],
124 | "": ["wait", "expandable?", "cd", "open"],
125 | "I": "open:vsplit",
126 | "o": ["wait", "expanded?", "collapse", "expand"],
127 | "O": "open:tab",
128 | "n": "collapse",
129 | "l": "gotoParent",
130 | "yp": "copyFilepath",
131 | "yn": "copyFilename",
132 | "yy": "copyFile",
133 | "dd": "cutFile",
134 | "pp": "pasteFile",
135 | "dD": "deleteForever",
136 | "a": "addFile",
137 | "k": "addFile",
138 | "M": "addDirectory",
139 | "cw": "rename",
140 | ".": "toggleHidden",
141 | "zh": "toggleHidden",
142 | "R": "refresh",
143 | "?": "help",
144 | "q": "quit",
145 | "X": "systemExecute",
146 | "gd": "listDrive",
147 | "f": "search",
148 | "F": "searchRecursive",
149 | "B": "gotoSource:file",
150 | "b": "gotoSource:buffer",
151 | "[[": "sourcePrev",
152 | "]]": "sourceNext",
153 | "[d": "diagnosticPrev",
154 | "]d": "diagnosticNext",
155 | "[c": "gitPrev",
156 | "]c": "gitNext",
157 | "<<": "gitStage",
158 | ">>": "gitUnstage"
159 | },
160 | "flutter.outlineWidth": 40,
161 | "flutter.outlineIconPadding": 0,
162 | "flutter.UIPath": true,
163 | "flutter.openDevLogSplitCommand": "botright 12split",
164 | "flutter.lsp.initialization.onlyAnalyzeProjectsWithOpenFiles": false,
165 | "flutter.trace.server": "off",
166 | "dart.lineLength": 100,
167 | "tslint.autoFixOnSave": false,
168 | "python.autoComplete.addBrackets": true,
169 | "python.jediEnabled": false,
170 | "python.formatting.provider": "yapf",
171 | "python.formatting.yapfArgs": [
172 | "--style",
173 | "{SPACES_AROUND_POWER_OPERATOR: True, SPACES_BEFORE_COMMENT: 1}"
174 | ],
175 | "html.format.enable": true,
176 | "javascript.referencesCodeLens.enable": true,
177 | "javascript.showUnused": true,
178 | "javascript.suggest.names": true,
179 | "javascript.suggestionActions.enabled": true,
180 | "json.format.enable": true,
181 | "eslint.autoFixOnSave": false,
182 | "prettier.printWidth": 100,
183 | "prettier.disableLanguages": [],
184 | "prettier.formatterPriority": 1,
185 | "prettier.useTabs": true,
186 | "prettier.trailingComma": "all",
187 | "prettier.singleQuote": false,
188 | "todolist.autoUpload": true,
189 | "todolist.promptForReminder": false,
190 | "coc-actions.hideCursor": false,
191 | "coc-actions.showActionKind": true,
192 | "diagnostic-languageserver.filetypes": {
193 | "vim": "vint",
194 | "email": "languagetool",
195 | "markdown": ["write-good", "markdownlint"],
196 | "sh": "shellcheck",
197 | "elixir": ["mix_credo", "mix_credo_compile"],
198 | "eelixir": ["mix_credo", "mix_credo_compile"],
199 | "php": ["phpstan", "psalm"]
200 | },
201 | "diagnostic-languageserver.formatFiletypes": {
202 | "elixir": "mix_format",
203 | "eelixir": "mix_format"
204 | },
205 | "languageserver": {
206 | "lua": {
207 | "command": "lua-lsp",
208 | "filetypes": ["lua"]
209 | },
210 | "swift": {
211 | "command": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp",
212 | "args": [],
213 | "filetypes": ["swift"],
214 | "initializationOptions": {},
215 | "settings": {}
216 | },
217 | "golang": {
218 | "command": "gopls",
219 | "rootPatterns": ["go.mod"],
220 | "filetypes": ["go"],
221 | "initializationOptions": {
222 | "gocodeCompletionEnabled": true,
223 | "diagnosticsEnabled": true,
224 | "lintTool": "golint"
225 | }
226 | },
227 | "bash": {
228 | "command": "bash-language-server",
229 | "args": ["start"],
230 | "filetypes": ["sh"],
231 | "ignoredRootPaths": []
232 | },
233 | "racket": {
234 | "command": "racket",
235 | "args": ["--lib", "racket-langserver"],
236 | "filetypes": ["scheme", "racket"]
237 | },
238 | "terraform": {
239 | "command": "terraform-ls",
240 | "args": ["serve"],
241 | "filetypes": ["terraform", "tf"],
242 | "initializationOptions": {},
243 | "settings": {}
244 | },
245 | "ccls": {
246 | "command": "ccls",
247 | "filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
248 | "rootPatterns": [".ccls", ".ccls-root", "compile_commands.json", ".git/", ".hg/"],
249 | "initializationOptions": {
250 | "cache": {
251 | "directory": "/tmp/ccls"
252 | }
253 | }
254 | }
255 | }
256 | }
257 |
--------------------------------------------------------------------------------
/cursor.vim:
--------------------------------------------------------------------------------
1 | " interestind stess
2 | noremap [a 1k
3 | noremap [r 2k
4 | noremap [s 3k
5 | noremap [t 4k
6 | noremap [d 5k
7 | noremap [h 6k
8 | noremap [n 7k
9 | noremap [e 8k
10 | noremap [i 9k
11 | noremap [ao 10k
12 | noremap [aa 11k
13 | noremap [ar 12k
14 | noremap [as 13k
15 | noremap [at 14k
16 | noremap [ad 15k
17 | noremap [ah 16k
18 | noremap [an 17k
19 | noremap [ae 18k
20 | noremap [ai 19k
21 | noremap [ro 20k
22 | noremap [ra 21k
23 | noremap [rr 22k
24 | noremap [rs 23k
25 | noremap [rt 24k
26 | noremap [rd 25k
27 | noremap [rh 26k
28 | noremap [rn 27k
29 | noremap [re 28k
30 | noremap [ri 29k
31 | noremap [so 30k
32 | noremap [sa 31k
33 | noremap [sr 32k
34 | noremap [ss 33k
35 | noremap [st 34k
36 | noremap [sd 35k
37 | noremap [sh 36k
38 | noremap [sn 37k
39 | noremap [se 38k
40 | noremap [si 39k
41 | noremap [to 40k
42 | noremap [ta 41k
43 | noremap [tr 42k
44 | noremap [ts 43k
45 | noremap [tt 44k
46 | noremap [td 45k
47 | noremap [th 46k
48 | noremap [tn 47k
49 | noremap [te 48k
50 | noremap [ti 49k
51 | noremap [do 50k
52 | noremap [da 51k
53 | noremap [dr 52k
54 | noremap [ds 53k
55 | noremap [dt 54k
56 | noremap [dd 55k
57 | noremap [dh 56k
58 | noremap [dn 57k
59 | noremap [de 58k
60 | noremap [di 59k
61 | noremap [ho 60k
62 | noremap [ha 61k
63 | noremap [hr 62k
64 | noremap [hs 63k
65 | noremap [ht 64k
66 | noremap [hd 65k
67 | noremap [hh 66k
68 | noremap [hn 67k
69 | noremap [he 68k
70 | noremap [hi 69k
71 | noremap [no 70k
72 | noremap [na 71k
73 | noremap [nr 72k
74 | noremap [ns 73k
75 | noremap [nt 74k
76 | noremap [nd 75k
77 | noremap [nh 76k
78 | noremap [nn 77k
79 | noremap [ne 78k
80 | noremap [ni 79k
81 | noremap [eo 80k
82 | noremap [ea 81k
83 | noremap [er 82k
84 | noremap [es 83k
85 | noremap [et 84k
86 | noremap [ed 85k
87 | noremap [eh 86k
88 | noremap [en 87k
89 | noremap [ee 88k
90 | noremap [ei 89k
91 | noremap [io 90k
92 | noremap [ia 91k
93 | noremap [ir 92k
94 | noremap [is 93k
95 | noremap [it 94k
96 | noremap [id 95k
97 | noremap [ih 96k
98 | noremap [in 97k
99 | noremap [ie 98k
100 | noremap [ii 99k
101 | noremap [aoo 100k
102 | noremap [aoa 101k
103 | noremap [aor 102k
104 | noremap [aos 103k
105 | noremap [aot 104k
106 | noremap [aod 105k
107 | noremap [aoh 106k
108 | noremap [aon 107k
109 | noremap [aoe 108k
110 | noremap [aoi 109k
111 | noremap [aao 110k
112 | noremap [aaa 111k
113 | noremap [aar 112k
114 | noremap [aas 113k
115 | noremap [aat 114k
116 | noremap [aad 115k
117 | noremap [aah 116k
118 | noremap [aan 117k
119 | noremap [aae 118k
120 | noremap [aai 119k
121 | noremap [aro 120k
122 | noremap [ara 121k
123 | noremap [arr 122k
124 | noremap [ars 123k
125 | noremap [art 124k
126 | noremap [ard 125k
127 | noremap [arh 126k
128 | noremap [arn 127k
129 | noremap [are 128k
130 | noremap [ari 129k
131 | noremap [aso 130k
132 | noremap [asa 131k
133 | noremap [asr 132k
134 | noremap [ass 133k
135 | noremap [ast 134k
136 | noremap [asd 135k
137 | noremap [ash 136k
138 | noremap [asn 137k
139 | noremap [ase 138k
140 | noremap [asi 139k
141 | noremap [ato 140k
142 | noremap [ata 141k
143 | noremap [atr 142k
144 | noremap [ats 143k
145 | noremap [att 144k
146 | noremap [atd 145k
147 | noremap [ath 146k
148 | noremap [atn 147k
149 | noremap [ate 148k
150 | noremap [ati 149k
151 | noremap [ado 150k
152 | noremap [ada 151k
153 | noremap [adr 152k
154 | noremap [ads 153k
155 | noremap [adt 154k
156 | noremap [add 155k
157 | noremap [adh 156k
158 | noremap [adn 157k
159 | noremap [ade 158k
160 | noremap [adi 159k
161 | noremap [aho 160k
162 | noremap [aha 161k
163 | noremap [ahr 162k
164 | noremap [ahs 163k
165 | noremap [aht 164k
166 | noremap [ahd 165k
167 | noremap [ahh 166k
168 | noremap [ahn 167k
169 | noremap [ahe 168k
170 | noremap [ahi 169k
171 | noremap [ano 170k
172 | noremap [ana 171k
173 | noremap [anr 172k
174 | noremap [ans 173k
175 | noremap [ant 174k
176 | noremap [and 175k
177 | noremap [anh 176k
178 | noremap [ann 177k
179 | noremap [ane 178k
180 | noremap [ani 179k
181 | noremap [aeo 180k
182 | noremap [aea 181k
183 | noremap [aer 182k
184 | noremap [aes 183k
185 | noremap [aet 184k
186 | noremap [aed 185k
187 | noremap [aeh 186k
188 | noremap [aen 187k
189 | noremap [aee 188k
190 | noremap [aei 189k
191 | noremap [aio 190k
192 | noremap [aia 191k
193 | noremap [air 192k
194 | noremap [ais 193k
195 | noremap [ait 194k
196 | noremap [aid 195k
197 | noremap [aih 196k
198 | noremap [ain 197k
199 | noremap [aie 198k
200 | noremap [aii 199k
201 |
202 | noremap 'a 1j
203 | noremap 'r 2j
204 | noremap 's 3j
205 | noremap 't 4j
206 | noremap 'd 5j
207 | noremap 'h 6j
208 | noremap 'n 7j
209 | noremap 'e 8j
210 | noremap 'i 9j
211 | noremap 'ao 10j
212 | noremap 'aa 11j
213 | noremap 'ar 12j
214 | noremap 'as 13j
215 | noremap 'at 14j
216 | noremap 'ad 15j
217 | noremap 'ah 16j
218 | noremap 'an 17j
219 | noremap 'ae 18j
220 | noremap 'ai 19j
221 | noremap 'ro 20j
222 | noremap 'ra 21j
223 | noremap 'rr 22j
224 | noremap 'rs 23j
225 | noremap 'rt 24j
226 | noremap 'rd 25j
227 | noremap 'rh 26j
228 | noremap 'rn 27j
229 | noremap 're 28j
230 | noremap 'ri 29j
231 | noremap 'so 30j
232 | noremap 'sa 31j
233 | noremap 'sr 32j
234 | noremap 'ss 33j
235 | noremap 'st 34j
236 | noremap 'sd 35j
237 | noremap 'sh 36j
238 | noremap 'sn 37j
239 | noremap 'se 38j
240 | noremap 'si 39j
241 | noremap 'to 40j
242 | noremap 'ta 41j
243 | noremap 'tr 42j
244 | noremap 'ts 43j
245 | noremap 'tt