Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
de140f9
Add Python 3 required statement
elliotwutingfeng Feb 8, 2024
5444b76
Add sourcing from my_configs/
artnim May 13, 2024
4d7252f
Correct copy paste errors
artnim May 17, 2024
adf21e7
Update README.md
artnim May 27, 2024
20b39ea
Add vim-terraform plugin
shamanaitor Aug 17, 2024
22cf447
Update the plugins
RobLoach Sep 19, 2024
c11a606
Merge branch 'amix:master' into patch-1
elliotwutingfeng Jul 26, 2025
beb34e9
change peepopen map to cmap, apply pr 764 and 777, and fix issue 767
Willie169 Jan 9, 2026
64faffa
Merge branch 'pr-761'
Willie169 Jan 9, 2026
6fe9362
Merge branch 'pr-760'
Willie169 Jan 9, 2026
a346b37
Merge branch 'pr-757'
Willie169 Jan 9, 2026
63a4314
Merge branch 'pr-755'
Willie169 Jan 9, 2026
6fde3b1
fix W and add Wq
Willie169 Jan 9, 2026
655e4d6
clipboard and mouse
Willie169 Jan 9, 2026
7ed1c98
copilot disabled by default
Willie169 Jan 9, 2026
f8b3276
fix fix for issue 767
Willie169 Jan 9, 2026
e5821d9
fix fix for fix for issue 767
Willie169 Jan 9, 2026
4d52e25
README-for-767-fix
Willie169 Jan 9, 2026
602d332
copilot-toggle
Willie169 Jan 9, 2026
4642df9
copilot-setup
Willie169 Jan 9, 2026
d587896
change to hybrid number
Willie169 Jan 9, 2026
d19c214
vim-terraform
Willie169 Jan 23, 2026
f81b1c2
vim-terraform
Willie169 Jan 23, 2026
d38e587
clipboard
Willie169 Jan 23, 2026
486b9be
vim-wayland-clipboard
Willie169 Jan 23, 2026
b01671e
readme
Willie169 Feb 3, 2026
0b41820
clean
Willie169 Feb 8, 2026
2a56bdc
fix Wq
Willie169 Feb 24, 2026
9af88ce
format
Willie169 Feb 24, 2026
88ec858
fcitx.vim
Willie169 Feb 26, 2026
e1e63a5
termux-clipboard
Willie169 Mar 6, 2026
bb594d6
y
Willie169 Mar 6, 2026
952d0d6
update_non_forked
Willie169 Mar 6, 2026
fe60c67
old_icon_no_longer_available
Willie169 Mar 6, 2026
8f6037f
vim-gist
Willie169 Mar 9, 2026
0ea04a0
update_sources
Willie169 Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sources_forked/yankring/doc/tags
sources_non_forked/tlib/doc/tags
sources_non_forked/ctrlp.vim/doc/tags*
my_plugins/
my_configs/
my_configs.vim
tags
.DS_Store
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![VIM](https://dnp4pehkvoo6n.cloudfront.net/43c5af597bd5c1a64eb1829f011c208f/as/Ultimate%20Vimrc.svg)

![VIM](https://www.vim.org/images/vim_small.gif)

# The Ultimate vimrc

Expand Down Expand Up @@ -60,8 +61,7 @@ If you have vim aliased as `vi` instead of `vim`, make sure to either alias it:

## How to update to latest version?

Just do a git rebase!

Just do a git rebase! Python 3 is required.

cd ~/.vim_runtime
git reset --hard
Expand Down Expand Up @@ -103,11 +103,14 @@ I recommend reading the docs of these plugins to understand them better. Each pl
* [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors): Sublime Text style multiple selections for Vim, CTRL+N is remapped to CTRL+S (due to YankRing)
* [vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack): Maintains a history of previous yanks, changes and deletes
* [vim-zenroom2](https://github.com/amix/vim-zenroom2) Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room
* [gist-vim](https://github.com/mattn/gist-vim) Easily create gists from Vim using the `:Gist` command
* [vim-gist](https://github.com/mattn/vim-gist) Easily create gists from Vim using the `:Gist` command
* [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides) Is a plugin for visually displaying indent levels in Vim
* [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim) EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs
* [copilot.vim](https://github.com/github/copilot.vim) Plugin for GitHub Copilot (AI autocompletion FTW 😅)

* [vim-terraform](https://github.com/hashivim/vim-terraform) Plugin for syntax highlighting, indentation and more for HCL and Terraform-related files
* [vim-wayland-clipboard](https://github.com/jasonccox/vim-wayland-clipboard) Plugin that allows Vim to integrate with the Wayland clipboard when using the `+` register
* [fcitx.vim](https://github.com/lilydjwg/fcitx.vim) Keep and restore fcitx state for each buffer separately when leaving/re-entering insert mode or search mode
* [termux-clipboard](https://github.com/Willie169/termux-clipboard) Integrate Vim '+' register with the Android system clipboard via Termux APIs

## Included color schemes

Expand Down Expand Up @@ -148,7 +151,10 @@ For instance, my `my_configs.vim` looks like this:

~/.vim_runtime > cat my_configs.vim
map <leader>ct :cd ~/Desktop/Todoist/todoist<cr>
map <leader>cw :cd ~/Desktop/Wedoist/wedoist<cr>
map <leader>cw :cd ~/Desktop/Wedoist/wedoist<cr>

To further structure your own stuff or to enable integration in *dotfile* managers like [chezmoi](https://chezmoi.io)
place `.vim` files with `vimrc` matching syntax in the `~/.vim_runtime/my_configs/` directory.

You can also install your plugins, for instance, via pathogen you can install [vim-rails](https://github.com/tpope/vim-rails):

Expand Down Expand Up @@ -201,6 +207,7 @@ map <leader>bd :Bclose<cr>
" Close all buffers
map <leader>ba :1,1000 bd!<cr>
```

Useful mappings for managing tabs:
```vim
map <leader>tn :tabnew<cr>
Expand Down Expand Up @@ -256,7 +263,7 @@ vnoremap $e <esc>`>a`<esc>`<i`<esc>

### Insert mode mappings

Quickly insert parenthesis/brackets/etc.:
Quickly insert parenthesis/brackets/etc., disabled by default for Shell, PHP, and Perl and enabled by default for other files, can be toggled on and of by pressing `<leader>u`:
```vim
inoremap $1 ()<esc>i
inoremap $2 []<esc>i
Expand Down Expand Up @@ -289,7 +296,8 @@ cnoremap <C-N> <Down>

Write the file as sudo (works only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write):

:W
:W
:Wq

### Plugin related mappings

Expand Down Expand Up @@ -367,6 +375,7 @@ nmap <silent> <leader>a <Plug>(ale_next_wrap)
nnoremap <leader>v :.GBrowse!<CR>
xnoremap <leader>v :'<'>GBrowse!<CR>
```
[copilot.vim](https://github.com/github/copilot.vim) is disabled by default. Setup with `:Copilot setup`. To enable it by default, add `let g:copilot_enabled = v:true` in `my_configs.vim`. To toggle it on and off, press `<leader>gc`
### Spell checking
Pressing `<leader>ss` will toggle spell checking:
```vim
Expand Down Expand Up @@ -416,3 +425,4 @@ Maintaining this Vim configuration isn't my day job. Daily I am the founder/CEO

PS: Using Vim isn't a requirement 😄


19 changes: 15 additions & 4 deletions install_awesome_parameterized.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cd $1

VIMRC="\" DO NOT EDIT THIS FILE
\" Add your own customizations in $1/my_configs.vim
\" See $1/README.md \"How to include your own stuff\" for further options.

set runtimepath+=$1

Expand All @@ -14,10 +15,20 @@ source $1/vimrcs/filetypes.vim
source $1/vimrcs/plugins_config.vim
source $1/vimrcs/extended.vim

try
source $1/my_configs.vim
catch
endtry"
let files = glob(\"$1/my_configs/*.vim\", 1, 1)
if empty(files)
try
source $1/my_configs.vim
catch
endtry
else
for file in files
try
execute 'source' fnameescape(file)
catch
endtry
endfor
endif"

if [ "$2" = "--all" ]; then
USERS=$(ls -l /home | awk '{if(NR>1)print $9}')
Expand Down
20 changes: 16 additions & 4 deletions install_awesome_vimrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@ cd ~/.vim_runtime

echo '" DO NOT EDIT THIS FILE
" Add your own customizations in ~/.vim_runtime/my_configs.vim
" See ~/.vim_runtime/README.md "How to include your own stuff" for further options.

set runtimepath+=~/.vim_runtime

source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
try
source ~/.vim_runtime/my_configs.vim
catch
endtry' > ~/.vimrc

let files=glob("~/.vim_runtime/my_configs/*.vim", 1, 1)
if empty(files)
try
source ~/.vim_runtime/my_configs.vim
catch
endtry
else
for file in files
try
execute 'source' fnameescape(file)
catch
endtry
endfor
endif' > ~/.vimrc

echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)"
2 changes: 1 addition & 1 deletion sources_forked/vim-peepopen/plugin/peepopen.vim
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ noremap <unique> <script> <Plug>PeepOpen <SID>Launch
noremap <SID>Launch :call <SID>LaunchPeepOpenViaVim()<CR>

if !hasmapto('<Plug>PeepOpen')
map! <unique> <silent> <Leader>p <Plug>PeepOpen
cmap <unique> <silent> <Leader>p <Plug>PeepOpen
endif

let &cpo = s:save_cpo
Expand Down
6 changes: 6 additions & 0 deletions sources_non_forked/ale/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ALE Agent instructions

1. Read documentation from `doc/ale-development.txt` to understand how to be an
ALE developer.
2. Run Vader/Vim tests with `./run-tests -q --fast test/path/some_file.vader`
3. When editing Lua code run Lua tests with `./run-tests -q --lua-only`
81 changes: 68 additions & 13 deletions sources_non_forked/ale/ale_linters/ansible/ansible_lint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,44 @@
" Description: ansible-lint for ansible-yaml files

call ale#Set('ansible_ansible_lint_executable', 'ansible-lint')
call ale#Set('ansible_ansible_lint_auto_pipenv', 0)
call ale#Set('ansible_ansible_lint_auto_poetry', 0)
call ale#Set('ansible_ansible_lint_auto_uv', 0)
call ale#Set('ansible_ansible_lint_change_directory', 1)

function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv')
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_pipenv'))
\ && ale#python#PipenvPresent(a:buffer)
return 'pipenv'
endif

if (ale#Var(a:buffer, 'python_auto_poetry')
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_poetry'))
\ && ale#python#PoetryPresent(a:buffer)
return 'poetry'
endif

if (ale#Var(a:buffer, 'python_auto_uv')
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_uv'))
\ && ale#python#UvPresent(a:buffer)
return 'uv'
endif

return ale#Var(a:buffer, 'ansible_ansible_lint_executable')
endfunction

function! ale_linters#ansible#ansible_lint#GetCwd(buffer) abort
if ale#Var(a:buffer, 'ansible_ansible_lint_change_directory')
" Run from project root if found, else from buffer dir.
let l:project_root = ale#python#FindProjectRoot(a:buffer)

return !empty(l:project_root) ? l:project_root : '%s:h'
endif

return ''
endfunction

function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
for l:line in a:lines[:10]
if match(l:line, '^Traceback') >= 0
Expand Down Expand Up @@ -103,28 +136,50 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
endfunction

function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
let l:commands = {
\ '>=6.0.0': '%e --nocolor -f json -x yaml %s',
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s',
\ '<5.0.0': '%e --nocolor -p %t'
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)

let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
\ ? ' run ansible-lint'
\ : ''

let l:opts_map = {
\ '>=6.0.0': ' --nocolor -f json -x yaml %s',
\ '>=5.0.0': ' --nocolor --parseable-severity -x yaml %s',
\ '<5.0.0': ' --nocolor -p %t'
\}
let l:command = ale#semver#GTE(a:version, [6, 0]) ? l:commands['>=6.0.0'] :
\ ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] :
\ l:commands['<5.0.0']

let l:cmd_opts = ale#semver#GTE(a:version, [6, 0]) ? l:opts_map['>=6.0.0'] :
\ ale#semver#GTE(a:version, [5, 0]) ? l:opts_map['>=5.0.0'] :
\ l:opts_map['<5.0.0']

let l:command = ale#Escape(l:executable) . l:exec_args . l:cmd_opts

return l:command
endfunction

function! ale_linters#ansible#ansible_lint#RunWithVersionCheck(buffer) abort
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)

let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
\ ? ' run ansible-lint'
\ : ''

let l:command = ale#Escape(l:executable) . l:exec_args . ' --version'

return ale#semver#RunWithVersionCheck(
\ a:buffer,
\ l:executable,
\ l:command,
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
\)
endfunction

call ale#linter#Define('ansible', {
\ 'name': 'ansible_lint',
\ 'aliases': ['ansible', 'ansible-lint'],
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
\ buffer,
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),
\ '%e --version',
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
\ )},
\ 'cwd': function('ale_linters#ansible#ansible_lint#GetCwd'),
\ 'command': function('ale_linters#ansible#ansible_lint#RunWithVersionCheck'),
\ 'lint_file': 1,
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
\ buffer,
Expand Down
6 changes: 4 additions & 2 deletions sources_non_forked/ale/ale_linters/asciidoc/proselint.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
" Author: Daniel M. Capella https://github.com/polyzen
" Description: proselint for AsciiDoc files

call ale#Set('proselint_executable', 'proselint')

call ale#linter#Define('asciidoc', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
\ 'command': 'proselint %t',
\ 'executable': function('ale#proselint#GetExecutable'),
\ 'command': function('ale#proselint#GetCommandWithVersionCheck'),
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
\})
7 changes: 1 addition & 6 deletions sources_non_forked/ale/ale_linters/asciidoc/redpen.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
" Author: rhysd https://rhysd.github.io
" Description: Redpen, a proofreading tool (http://redpen.cc)

call ale#linter#Define('asciidoc', {
\ 'name': 'redpen',
\ 'executable': 'redpen',
\ 'command': 'redpen -f asciidoc -r json %t',
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
\})
call ale#handlers#redpen#DefineLinter('asciidoc')
2 changes: 1 addition & 1 deletion sources_non_forked/ale/ale_linters/asm/gcc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function! ale_linters#asm#gcc#GetCommand(buffer) abort
" -fsyntax-only doesn't catch everything.
return '%e -x assembler'
\ . ' -o ' . g:ale#util#nul_file
\ . '-iquote %s:h'
\ . ' -iquote %s:h'
\ . ' ' . ale#Var(a:buffer, 'asm_gcc_options') . ' -'
endfunction

Expand Down
43 changes: 43 additions & 0 deletions sources_non_forked/ale/ale_linters/bindzone/checkzone.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
" Description: named-checkzone for bindzone

call ale#Set('bindzone_checkzone_executable', 'named-checkzone')
call ale#Set('bindzone_checkzone_options', '-c IN')

function! ale_linters#bindzone#checkzone#GetCommand(buffer) abort
return '%e' . ale#Pad(ale#Var(a:buffer, 'bindzone_checkzone_options'))
\ . ' example.com %t'
endfunction

function! ale_linters#bindzone#checkzone#Handle(buffer, lines) abort
let l:warning_pattern = '\vzone example.com/IN: (.+)$'
let l:error_pattern = '\v:(\d+): (.+)$'
let l:output = []

for l:match in ale#util#GetMatches(a:lines, l:error_pattern)
let l:lnum = l:match[1]
let l:text = l:match[2]

call add(l:output, {'text': l:text, 'lnum': l:lnum + 0, 'type': 'E'})
endfor

for l:match in ale#util#GetMatches(a:lines, l:warning_pattern)
let l:text = l:match[1]

" Ignore information messages
let l:scrub_match = matchlist(l:text, '\v(loaded serial|not loaded due to) ')

if empty(l:scrub_match)
call add(l:output, {'text': l:text, 'lnum': 0, 'type': 'W'})
endif
endfor

return l:output
endfunction

call ale#linter#Define('bindzone', {
\ 'name': 'checkzone',
\ 'executable': {b -> ale#Var(b, 'bindzone_checkzone_executable')},
\ 'command': function('ale_linters#bindzone#checkzone#GetCommand'),
\ 'callback': 'ale_linters#bindzone#checkzone#Handle',
\ 'read_buffer': 0,
\})
Loading