Mercurial > packages > magicforger
comparison .vimrc @ 34:f65ab84ee47f default
merge with codex
| author | luka |
|---|---|
| date | Wed, 10 Sep 2025 21:00:47 -0400 |
| parents | 827efbf4d73c |
| children | 55d2e5c5dad9 |
comparison
equal
deleted
inserted
replaced
| 10:a9ff874afdbd | 34:f65ab84ee47f |
|---|---|
| 6 set smartindent | 6 set smartindent |
| 7 "set termguicolors | 7 "set termguicolors |
| 8 "set number | 8 "set number |
| 9 nnoremap <Leader>cc :set colorcolumn=80<cr> | 9 nnoremap <Leader>cc :set colorcolumn=80<cr> |
| 10 nnoremap <Leader>ncc :set colorcolumn-=80<cr> | 10 nnoremap <Leader>ncc :set colorcolumn-=80<cr> |
| 11 nnoremap <C-l> :ALECodeAction <cr> | |
| 11 set mouse=a | 12 set mouse=a |
| 12 | 13 |
| 13 function! FixPhpFiles() | 14 function! FixPhpFiles() |
| 14 " Save the current cursor position | 15 " Save the current cursor position |
| 15 let save_cursor = getpos(".") | 16 let save_cursor = getpos(".") |
| 25 nnoremap <leader>f :call FixPhpFiles()<CR> | 26 nnoremap <leader>f :call FixPhpFiles()<CR> |
| 26 | 27 |
| 27 " Committing commands | 28 " Committing commands |
| 28 map <C-k> :wa<CR>:!hg addremove && hg commit <CR> | 29 map <C-k> :wa<CR>:!hg addremove && hg commit <CR> |
| 29 | 30 |
| 30 " Git commands, for now don't port to hg | 31 |
| 31 " function! GitDiffCached() | 32 |
| 32 " let files = system('git diff --cached --name-only') | 33 function! SendBufferToProgram() |
| 33 " | 34 " Create a temporary file |
| 34 " if v:shell_error | 35 let temp_file = tempname() |
| 35 " echo "Error running git diff" | 36 |
| 36 " return | 37 " Write current buffer to the temporary file |
| 37 " endif | 38 exe "write! " . temp_file |
| 38 " | 39 |
| 39 " let filelist = split(files, "\n") | 40 " Send the content of the temporary file to your program |
| 40 " let chosen_file = inputlist(filelist) | 41 " Replace <your_program> with the actual command to run your program |
| 41 " | 42 let command = "cat " . temp_file . " | <your_program>" |
| 42 " if chosen_file != -1 | 43 |
| 43 " let cmd = 'tabnew ' . filelist[chosen_file] | 44 " Execute the command |
| 44 " execute cmd | 45 call system(command) |
| 45 " endif | 46 |
| 46 " endfunction | 47 " Optionally, delete the temporary file if not needed |
| 47 " | 48 call delete(temp_file) |
| 48 " execute "set <M-d>=\033d" | 49 endfunction |
| 49 " map <M-d> :call GitDiffCached()<CR> |
