# HG changeset patch # User Luka Sitas # Date 1727137925 14400 # Node ID e577dac6c9137f22c903965a3ddda40a79909815 # Parent 4bb4daa9e3f1af2804690c95490a7eabfb4e73fc Simple test diff -r 4bb4daa9e3f1 -r e577dac6c913 .vimrc --- a/.vimrc Wed Apr 24 19:52:35 2024 -0400 +++ b/.vimrc Mon Sep 23 20:32:05 2024 -0400 @@ -28,46 +28,3 @@ " Committing commands map :wa:!hg addremove && hg commit -" 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 =\033d" -" map :call GitDiffCached() -" -" -" -" - - -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 with the actual command to run your program - let command = "cat " . temp_file . " | " - - " Execute the command - call system(command) - - " Optionally, delete the temporary file if not needed - call delete(temp_file) -endfunction diff -r 4bb4daa9e3f1 -r e577dac6c913 src/Test.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Test.php Mon Sep 23 20:32:05 2024 -0400 @@ -0,0 +1,9 @@ +insert("I HAVE BEEN INSERTED", "{{ INSERT_1 }}"); +$fm->replace("I HAVE BEEN REPLACED", "{{ REPLACE_1 }}"); +$fm->write_to_path(__DIR__ . "/tmp2.php"); diff -r 4bb4daa9e3f1 -r e577dac6c913 src/tmp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tmp.php Mon Sep 23 20:32:05 2024 -0400 @@ -0,0 +1,6 @@ +