or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Vim 基本操作
在電光石火中我看不清你的身影
Installation
Debian:
Mac:
電光石火
Basic
<ESC>
i
v
:
exit:
:q
Workflow
vim hello.sh
:wq
chmod +x hello.sh && ./hello.sh
orbash hello.sh
Another Example
vim hello.py
:wq
chmod +x hello.py && ./hello.py
orpython3 hello.py
Practice
複製一些文字來練習操作 vim
複製一些程式碼來練習
modeline magic
pep8
Normal Mode
h
j
k
l
w
word,e
end,b
back3w
,4j
gg
G
0
,^
$
y
,y3w
,yy
x
,d
,dw
, paste:p
u
,Crtl
+r
s
, change:c
,cw
o
,O
i
,I
, append:a
,A
Advanced
=
r
,R
gg=G
,ggyG
,ci'
,da"
Visual Mode
v
,V
,Ctrl
+v
U
,u
<ESC>
Command
:q
:w
:sp
,:vsp
:s/pattern/new_string/g
/pattern
,:noh
:pu
,:pu!
:2,3
:%
=:1,$
:!ls
:help help
Advanced
:wqa
,:qa!
(do sth. to all windows):version
:reg
:%s/old/new/g
,:%!xxd
,:%!xxd -r
,:%s/\s*$//g | w | noh
prefix:
Ctrl
+w
.vimrc
config path:
~/.vimrc
,~/.vim/vimrc
my dotfiles
others
Vundle
Resource
cheat sheet
telegram
Tmux
config path:
~/.tmux.conf
tmux
,tmux a
prefix:
Ctrl
+b
detach:
<prefix>
+d
<prefix>
+c
/x
/%
/"
command:
<prefix>
+:
zsh, oh-my-zsh
config path:
~/.zshrc
oh-my-zsh
powerline font
Hacktoberfest
github
hacktoberfest 2018
Git
fork first