Hacker Newsnew | past | comments | ask | show | jobs | submit | vanous's commentslogin

Do note that mapy.cz is not open source and that they started moving more and more features into their subscription based paid offering... The beginning of enshittification.


Very cool! A while ago i did something similar and tried to learn vim more in depth by creating some more complex macros - several of them, to convert some text snippets into markdown. Problem was, that several months later i could not exactly remember some details of these "reusable" macros - where exactly to place cursor when starting them, the order of execution and so on. Thankfully, vim has the amazing ability to run commands/script on text selection, so i rewrote my macros in a scripting language. It has several bonus points: i can store them in git and track changes, code can be self-documented via comments. My macros were not too complex, but still, using a proper scripting ended up being much better.


Macroing Tip: whenever possible start a macro with a motion that will move the cursor to a known location. E.g. for line-oriented macros use "0" and for paragraph oriented macros use "}{". Then the macro will work regardless of where you put the cursor.


Perfect! Great advice


Insightful! I have had the same issue with forgetting where exactly I need the cursor. I did not know you could run script/commands on text selection, I will definitely look into this. The extent of my vimscript journey so far is directly making system() calls to external scripts, and I've been using the ability to Ctrl-R while entering a :command to dump yanked text as a crutch. Your approach sounds much more sensible.


Glad you find it useful. Below is an example script to demonstrate the concept. It is awesomely powerful. In vim, select some text and do this:

  :'<,'>! ./example.py

  #!/bin/env python3
  #:'<,'>! ./example.py # ← this is how to use it
  import sys
  data = sys.stdin.readlines()
  for l in data:
    l = l.replace("a", "e").rstrip()
    print(l)


Dash doesn't seem to be open source, plus it's a subscription model. Nothing against that, but OPs solution is MIT licensed.


Nice effort!

All these tools teach typing and looking at the typed text. Only few programs make physical separation between the source and the typed text or do hide the text currently typed. Try it... yet another level... :)


Thank you!


Agree. I wish the school system wouldn't ignore it as it does in many places.

Even with touch devices, to gain productivity, i see people to switch to keyboard input because pen or touch aren't fast enough and voice typing isn't possible for example in auditoriums.

But, don't learn to type quicker, learn to type precisely. Speed will come.



Long battery life

Apps/watchfaces SDK and app store

Smart replies (i.e. reply to sms)

Display visibility outside


> GitHub is a web-based front-end to Git.

¯\_(ツ)_/¯

208 mentions of GitHub.

4 mentions of Gitea.

3 mentions of GitLab.

Why is it so biased and why is it helping to continue to teach people to centralized git.


It seems that Beej built this guide to help his students. More of them are probably using Git and GitHub in anger than the other tools.


Počítá


Interestingly enough, searching for ě on the page finds the ĕ as well, but so does search for e...


At least in Firefox the search pane has a ‘Match Diacritics’ option. Turning it on causes it to match only the precise characters in the textbox. (It’s slightly misnamed, since it doesn’t just handle diacritics, but also cases like ⟨e⟩ vs ⟨ɛ⟩.)


The wonders of Unicode collation folding: http://www.unicode.org/reports/tr10/#Collation_Folding


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: