Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Lorne0
vimrc
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
vimrc
/
_vimrc
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
56 lines (48 loc) · 1.47 KB
master
Breadcrumbs
vimrc
/
_vimrc
Copy path
Top
File metadata and controls
Code
Blame
56 lines (48 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
" 文件編碼格式
set encoding=utf-8
set fileencodings=utf-8,big5 " encoding priority when open file
set fileencoding=utf-8 " default encoding
" 主控台編碼格式
language messages zh_TW.utf-8
" pathogen
source ~/.vim/bundle/pathogen/autoload/pathogen.vim
call pathogen#infect()
" visual
syntax on " highlight
set nu " line num
set wrap linebreak
set t_Co=256
" edit
set nocompatible " VIM 不使用和 VI 相容的模式
filetype plugin on " 判斷類型
set foldmethod=syntax
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab " replace tab by space
set smartindent
set viminfo= " do not use viminfo
set ruler " Top/Bot/All/%
set hlsearch " set the search result highlighted
set incsearch " 在關鍵字還沒完全輸入完畢前就顯示結果
set confirm " 操作過程有衝突時,以明確的文字來詢問
set history=100
" hotkeys
map <F2> <ESC>:NERDTreeToggle<CR>
autocmd FileType c map <F9> <ESC>:w<CR>:!gcc % -o %<<CR>
autocmd FileType cpp map <F9> <ESC>:w<CR>:!g++ % -o %<<CR>
autocmd FileType c,cpp map <F5> <ESC>:!./%<<CR>
autocmd FileType c,cpp map <c-F5> <ESC>:!./%< <%<.in<CR>
" commands
com INPUT sp %<.in
" 切換分割窗
" 移到下面分割窗並放大
map <C-J> <C-W>j<C-W>_
" 移到上面分割窗並放大
map <C-K> <C-W>k<C-W>_
" 移到左邊分割窗並放大
nmap <c-h> <c-w>h<c-w><bar>
" 移到右邊分割窗並放大
nmap <c-l> <c-w>l<c-w><bar>
" 將分割窗最小長寬設為0,才能放到最大
set wmw=0 wmh=0
You can’t perform that action at this time.