<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title>smt blog</title>
	<subtitle>Stephen Tudor&#x27;s notes</subtitle>
	<link href="https://blog.smt.io/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="https://blog.smt.io"/>
	<generator uri="https://www.getzola.org/">Zola</generator>
	<updated>2019-03-20T00:00:00+00:00</updated>
	<id>https://blog.smt.io/atom.xml</id>
	<entry xml:lang="en">
		<title>Tengwar</title>
		<published>2019-03-20T00:00:00+00:00</published>
		<updated>2019-03-20T00:00:00+00:00</updated>
		<link href="https://blog.smt.io/tengwar/" type="text/html"/>
		<id>https://blog.smt.io/tengwar/</id>
		<content type="html">&lt;style&gt;
@font-face {
    font-family: &quot;Tengwar Annatar&quot;;
    src: url(&quot;&#x2F;fonts&#x2F;tngan.ttf&quot;) format(&quot;truetype&quot;);
}
&lt;&#x2F;style&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tengwar&quot;&gt;Tengwar&lt;&#x2F;a&gt; is a fictional writing system devised by J.R.R. Tolkien to support the rich history of Elves in Middle Earth. As Tolkien was an Englishman, there are several examples in his hand of English prose written using Tengwar.&lt;&#x2F;p&gt;
&lt;p&gt;In Tolkien&#x27;s fictional world, the Tengwar gave written form to the Elvish tongues of Quenya and Sindarin. Tengwar could also be used to transliterate the tongue of Mordor, as it famously did in the case of the One Ring&#x27;s inscription.&lt;&#x2F;p&gt;
&lt;p&gt;Since the Lord of the Rings movies were produced in the early 2000s, there has been an undercurrent trend of &amp;quot;elvish&amp;quot; tattoos of names or mottos. This is where I got started with my Tengwar fascination.&lt;&#x2F;p&gt;
&lt;p&gt;Here is how I spell my own name in Tengwar (rendered here with the Tengwar Annatar font):&lt;&#x2F;p&gt;
&lt;p&gt;&lt;span style=&quot;font-family:&#x27;Tengwar Annatar&#x27;;font-size:2em&quot; title=&quot;Stephen Tudor&quot;&gt;81QF5$ 12&amp;amp;6Y&lt;&#x2F;span&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Would I get a tattoo of that? No, I don&#x27;t think I will.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;learning&quot;&gt;Learning&lt;&#x2F;h2&gt;
&lt;p&gt;As I began to learn more about Tengwar and the mechanics of the writing system, I was struck by its depth and beauty. Although I am not a linguist, and you likely aren&#x27;t either, I would recommend &lt;a href=&quot;https:&#x2F;&#x2F;www.tecendil.com&#x2F;about.html&quot;&gt;The Tengwar Handbook&lt;&#x2F;a&gt; by Arno Gourdol and &lt;a href=&quot;http:&#x2F;&#x2F;at.mansbjorkman.net&#x2F;tengwar.htm&quot;&gt;Amanye Tenceli&lt;&#x2F;a&gt; by Mäns Björkman as excellent primers on the most common ways to read and write Tengwar.&lt;&#x2F;p&gt;
&lt;p&gt;I began to journal (painfully slowly) in Tengwar, in an effort to learn it better. I tried to adopt the &amp;quot;English Mode&amp;quot; as described in the above resources.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;reference&quot;&gt;Reference&lt;&#x2F;h2&gt;
&lt;p&gt;To help myself out, I created a modest single-page reference for transliterating English to Tengwar. It was intended for my own personal use, but others may find it useful.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;images&#x2F;tengwar_reference.png&quot; alt=&quot;Low-resolution image of reference document&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Download: &lt;a href=&quot;&#x2F;files&#x2F;TengwarEnglishCommonMode-1.2.pdf&quot;&gt;Tengwar Reference PDF&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; (139 KB)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I favor transliterating &lt;a href=&quot;http:&#x2F;&#x2F;at.mansbjorkman.net&#x2F;teng_general_english.htm#eng_orth&quot;&gt;orthographically&lt;&#x2F;a&gt; rather than &lt;a href=&quot;http:&#x2F;&#x2F;at.mansbjorkman.net&#x2F;teng_general_english.htm#eng_phon&quot;&gt;phonemically&lt;&#x2F;a&gt; (my brain just works that way), but the reference should be helpful to writers of either method.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;&#x2F;h2&gt;
&lt;p&gt;For more information about Tengwar and related topics, see these excellent sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.tecendil.com&#x2F;about.html&quot;&gt;The Tengwar Handbook&lt;&#x2F;a&gt; by Arno Gourdol&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;at.mansbjorkman.net&#x2F;tengwar.htm&quot;&gt;Amanye Tenceli&lt;&#x2F;a&gt; by Mäns Björkman&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;http:&#x2F;&#x2F;www.forodrim.org&#x2F;daeron&#x2F;teng-sin.pdf&quot;&gt;Writing Sindarin with Tengwar (PDF)&lt;&#x2F;a&gt; by Per Lindberg&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.scribd.com&#x2F;doc&#x2F;61135121&#x2F;Tengwar-textbook&quot;&gt;Tengwar Textbook (PDF)&lt;&#x2F;a&gt; by Chris McKay&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dafont.com&#x2F;tengwar-annatar.font&quot;&gt;Tengwar Annatar&lt;&#x2F;a&gt; font&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Zap Gremlins</title>
		<published>2018-07-31T00:00:00+00:00</published>
		<updated>2018-07-31T00:00:00+00:00</updated>
		<link href="https://blog.smt.io/zap-gremlins/" type="text/html"/>
		<id>https://blog.smt.io/zap-gremlins/</id>
		<content type="html">&lt;p&gt;When copying text into Vim from Microsoft applications, such as Outlook or Word, oftentimes at the end of every line will be a &lt;code&gt;^M&lt;&#x2F;code&gt; character. It looks something like this in my text editor:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;This is an example of gremlins^M
appearing at the end of every^M
line. Who likes to look at such^M
atrocities? Certainly not me.^M
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the Unix world, we end lines with a single newline, but in the Windows world, the end-of-line is marked by a paring of a newline with a carriage return. The carriage return character shows up in Vim as &lt;code&gt;^M&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I call them &amp;quot;gremlins.&amp;quot; They are mostly harmless but annoying, since they make my text a bit uglier. More seriously, they can also cause issues with other applications.&lt;&#x2F;p&gt;
&lt;p&gt;What to do, especially if we are happily living in the Unix world? Destroy them all with a single command, of course. &lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-command&quot;&gt;The command&lt;&#x2F;h2&gt;
&lt;p&gt;Here is the Ex command I use to zap gremlins from my document, in all its cryptic, oops-my-cat-typed-this glory:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;maHm&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;b:&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fa5c4b;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;s&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&#x2F;&amp;lt;C-V&amp;gt;&amp;lt;CR&amp;gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;&#x2F;ge&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;&amp;lt;CR&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;#39;bzt&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;a
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Don&#x27;t worry, there&#x27;s a shortcut for that, which I&#x27;ll get to later.&lt;&#x2F;p&gt;
&lt;p&gt;The vomit of seemingly random characters looks more horrifying than it actually is. Let&#x27;s break it down. It&#x27;s actually a series of individual Ex commands, all run together as one big &amp;quot;command.&amp;quot;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-breakdown&quot;&gt;The breakdown&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;ma&lt;&#x2F;code&gt; creates a new mark at the cursor&#x27;s current position, saving it as mark &lt;code&gt;a&lt;&#x2F;code&gt;&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#marks&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;H&lt;&#x2F;code&gt; moves the cursor to the top of the screen.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;mb&lt;&#x2F;code&gt; creates a new mark at the cursor&#x27;s current position, saving it as mark &lt;code&gt;b&lt;&#x2F;code&gt;. This is so that we can have a reference to the original scroll position&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#marks&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;:%s&#x2F;&amp;lt;C-V&amp;gt;&amp;lt;CR&amp;gt;&#x2F;&#x2F;ge&amp;lt;CR&amp;gt;&lt;&#x2F;code&gt; is a global find-and-replace command, which deletes all &lt;code&gt;^M&lt;&#x2F;code&gt; characters in the current buffer (to find the gremlins, we search for &lt;code&gt;&amp;lt;C-V&amp;gt;&amp;lt;CR&amp;gt;&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x27;b&lt;&#x2F;code&gt; moves the cursor to mark &lt;code&gt;b&lt;&#x2F;code&gt;, the previous top of screen&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#marks&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;zt&lt;&#x2F;code&gt; forces a redraw, to restore the original scroll position.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x27;a&lt;&#x2F;code&gt; moves the cursor back to mark &lt;code&gt;a&lt;&#x2F;code&gt;, to restore the starting cursor position&lt;sup class=&quot;footnote-reference&quot;&gt;&lt;a href=&quot;#marks&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;#4 is the key command in the sequence; everything else going on is just bookkeeping to maintain a consistent cursor and scroll position afterwards.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-shortcut&quot;&gt;The shortcut&lt;&#x2F;h2&gt;
&lt;p&gt;In our Vim configuration, we define a new key binding (shortcut) and paste that gnarly command after it.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;font-style:italic;color:#928374;&quot;&gt;&amp;quot; zap gremlins (the Windows ^M)
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;nnoremap &amp;lt;Leader&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;mm maHm&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;b:&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fa5c4b;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;s&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&#x2F;&amp;lt;C-V&amp;gt;&amp;lt;CR&amp;gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1aa;&quot;&gt;&#x2F;ge&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;&amp;lt;CR&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;#39;bzt&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;a
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In my case, my Vim leader key is a comma, which means that simply typing &lt;code&gt;,mm&lt;&#x2F;code&gt; while in normal mode will run our compound Ex command to zap all gremlins in the current buffer.&lt;&#x2F;p&gt;
&lt;div class=&quot;footnote-definition&quot; id=&quot;marks&quot;&gt;&lt;sup class=&quot;footnote-definition-label&quot;&gt;1&lt;&#x2F;sup&gt;
&lt;p&gt;The names of the marks I used (&lt;code&gt;a&lt;&#x2F;code&gt; and &lt;code&gt;b&lt;&#x2F;code&gt;) are completely arbitrary. You can use whatever letters you wish (a-z within the current buffer).&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Vim Cheat Sheet for Programmers: Dvorak Edition</title>
		<published>2016-08-09T00:00:00+00:00</published>
		<updated>2016-08-09T00:00:00+00:00</updated>
		<link href="https://blog.smt.io/vim-cheat-sheet-dvorak/" type="text/html"/>
		<id>https://blog.smt.io/vim-cheat-sheet-dvorak/</id>
		<content type="html">&lt;p&gt;I found &lt;a href=&quot;http:&#x2F;&#x2F;michael.peopleofhonoronly.com&#x2F;vim&#x2F;&quot;&gt;this intense Vim cheat sheet&lt;&#x2F;a&gt;, and noticed that the author, Michael, had made the Excel 2011 sources available. Furthermore, he was kind enough to give it a &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Copyleft&quot;&gt;Copyleft&lt;&#x2F;a&gt; license.&lt;&#x2F;p&gt;
&lt;p&gt;Being a user of the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dvorak_Simplified_Keyboard&quot;&gt;Dvorak keyboard layout&lt;&#x2F;a&gt;, I took a few moments tonight to adapt the 300dpi color version to Dvorak. I&#x27;m making them available to download them for free, just like the originals. Other than the key layout changes, I bumped the version from 2.0 to 2.1, and updated the dates.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;images&#x2F;vim_cheat_sheet_for_programmers_print_DV_388.png&quot; alt=&quot;Low-resolution image of Vim cheat sheet for programmers: Dvorak edition&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Download: &lt;a href=&quot;&#x2F;files&#x2F;vim_cheat_sheet_for_programmers_print_DV.pdf&quot;&gt;PDF&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; (469 KB) &lt;strong&gt;or &lt;a href=&quot;&#x2F;files&#x2F;vim_cheat_sheet_for_programmers_print_DV.xlsx&quot;&gt;XLSX&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; (110 KB)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I don&#x27;t have any immediate plans to adapt the original low-res, monochrome, or accessible versions of the cheat sheet, but I&#x27;m more than happy to accept contributions from anyone, and make them available here.&lt;&#x2F;p&gt;
</content>
	</entry>
</feed>
