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
Developer articles
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 }}
helmuthdu
vim
Repository navigation
Code
Issues
1
(1)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
vim
/
autocmd.vim
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
38 lines (32 loc) · 1.38 KB
master
Breadcrumbs
vim
/
autocmd.vim
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
38 lines (32 loc) · 1.38 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
" AUTOCOMMANDS
if has("autocmd")
augroup FileTypeDetect
au BufEnter *.jsx set filetype=javascript.jsx
au BufEnter *.markdown,*.mkd,*.md setl wrap tw=79
au BufEnter *.json setl ft=javascript
au BufEnter *.coffee setl sw=2 expandtab ft=coffee
au BufEnter *.py setl ts=4 sw=4 sts=4
au BufEnter *.php setl ts=4 sw=4 sts=4
au BufEnter *.js setl ts=2 sw=2 sts=2
au BufEnter *.html setl ts=4 sw=4 sts=4
au BufEnter *.tex setl wrap tw=79 fo=tcqor
au BufEnter *.[ch] setl cindent
au BufEnter *.[ch]pp setl cindent
au BufEnter Makefile setl ts=4 sts=4 sw=4 noet list
au BufEnter *.es6 setf javascript
augroup END
" when enabling diff for a buffer it should be disabled when the
" buffer is not visible anymore
au BufHidden * if &diff == 1 | diffoff | setlocal nowrap | endif
" Instead of reverting the cursor to the last position in the buffer, we
" set it to the first line when editing a git commit message
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
" Automatically removing all trailing whitespace
au BufWritePre * :call StripTrailingWhitespace()
" Automatically source vimrc on save.
au! bufwritepost $MYVIMRC source $MYVIMRC
" Disable paste mode when leaving Insert Mode
au InsertLeave * set nopaste
" Resize splits when the window is resized
au VimResized * exe "normal! \<c-w>="
endif
You can’t perform that action at this time.