Blog: 2023-10-04: Difference between revisions

From razwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:


More guides to write: tmux, fpm, python, fish could be split into multiple chapters, and it'd be nice to have some sort of navigation between them.
More guides to write: tmux, fpm, python, fish could be split into multiple chapters, and it'd be nice to have some sort of navigation between them.

----

Wrote this little snippet to automatically activate venvs, haven't committed it, might not end up using it at all
<pre>
function _activate_venv --on-variable PWD
if git root &> /dev/null
if string-empty $VIRTUAL_ENV && is-dir venv
source venv/bin/activate.fish
end
else
if not string-empty $VIRTUAL_ENV
deactivate
end
end
end
</pre>

Revision as of 21:58, 4 October 2023

Cool new abbr

abbr -a --position anywhere -- --ver --version

Wanna get simple typos fixed in a couple places / ways

- vim: doable with iabbrev

- fish: doable with global abbrs

- browser: use browser extension I guess

Here's an article doing some next level stuff with vim abbrs: https://vonheikemen.github.io/devlog/tools/using-vim-abbreviations/

Now I'm thinking about stenography https://www.youtube.com/watch?v=nRp_1S7cj6A


Envisioning a system where I have nodes that are self-contained pieces... or something... then my guides would be implemented by listing all the nodes.

I mean it's all hypermedia anyways.

I could have a UI to link to a specific node, and the nodes would link to their sources, just like the guides would. Many nodes make up a single page, and could even be reused. Though that kind of duplication might confuse readers, so I'd have to be smart about it.

More guides to write: tmux, fpm, python, fish could be split into multiple chapters, and it'd be nice to have some sort of navigation between them.


Wrote this little snippet to automatically activate venvs, haven't committed it, might not end up using it at all

function _activate_venv --on-variable PWD
  if git root &> /dev/null
    if string-empty $VIRTUAL_ENV && is-dir venv
      source venv/bin/activate.fish
    end
  else
    if not string-empty $VIRTUAL_ENV
      deactivate
    end
  end
end