aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bash_profile2
-rw-r--r--bashrc4
-rw-r--r--vim/vimrc42
3 files changed, 44 insertions, 4 deletions
diff --git a/bash_profile b/bash_profile
index d45bc99..4b597b5 100644
--- a/bash_profile
+++ b/bash_profile
@@ -7,6 +7,8 @@ export PATH="$HOME/.local/share/gem/ruby/3.0.0/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="/usr/local/go/bin:$PATH"
+export OLLAMA_MODELS="$HOME/ai_models/ollama/"
+
# Setting CDPATH
#export CDPATH=$HOME/Documents/Notes/
diff --git a/bashrc b/bashrc
index 48c1484..ab38f31 100644
--- a/bashrc
+++ b/bashrc
@@ -387,6 +387,10 @@ flag() {
printf "%s\n" "FLAG: $*" >> ~/Documents/Notes/Scratch/scratchpad.txt
}
+consider() {
+ printf "%s\n" "CONSIDER: $*" >> ~/Documents/Notes/Scratch/scratchpad.txt
+}
+
# get best audio of YouTube file or playlist (just use the right URL)
diff --git a/vim/vimrc b/vim/vimrc
index cd930e8..f079754 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -42,8 +42,8 @@ nnoremap <C-p>p :GitFiles<CR>
nnoremap <leader>o :Tags<CR>
nnoremap <leader>h :History<CR>
nnoremap <silent> <leader>0 :Files<CR>
-nnoremap <silent> <leader>; :BLines<CR>
-nnoremap <silent> <leader>l :Lines<CR>
+nnoremap <silent> <leader>l :BLines<CR>
+nnoremap <silent> <leader>; :Lines<CR>
nnoremap <silent> <leader>o :BTags<CR>
nnoremap <C-p>b :Buffers<CR>
nnoremap <silent> <leader>? :History:<CR>
@@ -53,6 +53,40 @@ nnoremap <silent> <leader>CC :Commands<CR>
" Open quickfix list in a right vertical split (good for Ngrep results)
command! Vlist botright vertical copen | vertical resize 50
nnoremap <leader>v : Vlist<CR>
+
+" Do do a sort of fuzzy line match in the buffer insread
+" of BLines - call with :SearchAndAddToQuickfix ^IDEA and it will
+" open in quickfix:
+function! SearchAndAddToQuickfix(pattern)
+ " Clear the current quickfix list
+ call setqflist([])
+
+ " Initialize an empty list to store quickfix items
+ let l:qf_list = []
+
+ " Iterate over each line in the buffer to find matches
+ for l:num in range(1, line('$'))
+ let l:line = getline(l:num)
+
+ " If the line matches the search pattern, add it to the quickfix list
+ if l:line =~ a:pattern
+ call add(l:qf_list, {'filename': expand('%:p'), 'lnum': l:num, 'col': 1, 'text': l:line})
+ endif
+ endfor
+
+ " Set the quickfix list with the collected items
+ if !empty(l:qf_list)
+ call setqflist(l:qf_list, 'r')
+ " Open the quickfix window
+ copen
+ else
+ echo "No matches found for pattern: " . a:pattern
+ endif
+endfunction
+
+" Command to use the function, :SearchAndAddToQuickfix [pattern]
+command! -nargs=1 SearchAndAddToQuickfix call SearchAndAddToQuickfix(<q-args>)
+
" }}}
" Options {{{
set clipboard=unnamed,unnamedplus " just past in with out needing "*
@@ -369,8 +403,8 @@ let g:gruvbox_italic = 0
"colorscheme evening
"colorscheme sitruuna
-"colorscheme ayu
-colorscheme evening
+colorscheme ayu
+"colorscheme evening
"colorscheme gruvbox
" }}}
" GPG files {{{