diff .vimrc @ 34:f65ab84ee47f default

merge with codex
author luka
date Wed, 10 Sep 2025 21:00:47 -0400
parents 827efbf4d73c
children 55d2e5c5dad9
line wrap: on
line diff
--- a/.vimrc	Sat Dec 02 10:20:32 2023 -0500
+++ b/.vimrc	Wed Sep 10 21:00:47 2025 -0400
@@ -8,6 +8,7 @@
 "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! FixPhpFiles()
@@ -27,23 +28,22 @@
 " Committing commands
 map <C-k> :wa<CR>:!hg addremove && hg commit <CR>
 
-" Git commands, for now don't port to hg
-" function! GitDiffCached()
-"   let files = system('git diff --cached --name-only')
-" 
-"   if v:shell_error
-"     echo "Error running git diff"
-"     return
-"   endif
-" 
-"   let filelist = split(files, "\n")
-"   let chosen_file = inputlist(filelist)
-" 
-"   if chosen_file != -1
-" 		let cmd = 'tabnew ' . filelist[chosen_file]
-"     execute cmd
-"   endif
-" endfunction
-" 
-" execute "set <M-d>=\033d"
-" map <M-d> :call GitDiffCached()<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