Mercurial > packages > magicforger
view .vimrc @ 37:116b36f5e73b ls_dev_2025_09
Adding support for tests. It's pretty basic but we can improve later.
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Thu, 25 Sep 2025 19:58:01 -0400 |
| parents | 55d2e5c5dad9 |
| children |
line wrap: on
line source
syntax on set tabstop=2 set shiftwidth=2 set softtabstop=2 set autoindent set smartindent "set termguicolors "set number nnoremap <Leader>cc :set colorcolumn=80<cr> nnoremap <Leader>ncc :set colorcolumn-=80<cr> nnoremap <C-l> :ALECodeAction <cr> set mouse=a function! GeneratePhpCtags() let command = 'ctags -R --fields=+aimS --php-kinds=cdfint --languages=php --extras=+q --tag-relative=yes --exclude=".git" --exclude=".hg" --exclude="node_modules" --exclude="composer.phar" --totals=yes' let output = system(command) endfunction function! FixPhpFiles() " Save the current cursor position let save_cursor = getpos(".") "Format the files let command = 'php-cs-fixer fix .' let output = system(command) " Reload the file and restore the cursor position execute 'edit!' call setpos(".", save_cursor) endfunction nnoremap <leader>f :call FixPhpFiles()<CR> " Committing commands map <C-k> :wa<CR>:!hg addremove && hg commit <CR> function! SendBufferToProgram() " Create a temporary file let temp_file = tempname() " Write current buffer to the temporary file exe "write! " . temp_file " Send the content of the temporary file to your program " Replace <your_program> with the actual command to run your program let command = "cat " . temp_file . " | <your_program>" " Execute the command call system(command) " Optionally, delete the temporary file if not needed call delete(temp_file) endfunction
