comparison .vimrc @ 12:4bb4daa9e3f1 development

Working with the new FileModifier
author luka
date Wed, 24 Apr 2024 19:52:35 -0400
parents cf9993c5c7df
children e577dac6c913 827efbf4d73c
comparison
equal deleted inserted replaced
4:a20439b1c9d3 12:4bb4daa9e3f1
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(".")
45 " endif 46 " endif
46 " endfunction 47 " endfunction
47 " 48 "
48 " execute "set <M-d>=\033d" 49 " execute "set <M-d>=\033d"
49 " map <M-d> :call GitDiffCached()<CR> 50 " map <M-d> :call GitDiffCached()<CR>
51 "
52 "
53 "
54 "
55
56
57 function! SendBufferToProgram()
58 " Create a temporary file
59 let temp_file = tempname()
60
61 " Write current buffer to the temporary file
62 exe "write! " . temp_file
63
64 " Send the content of the temporary file to your program
65 " Replace <your_program> with the actual command to run your program
66 let command = "cat " . temp_file . " | <your_program>"
67
68 " Execute the command
69 call system(command)
70
71 " Optionally, delete the temporary file if not needed
72 call delete(temp_file)
73 endfunction