<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ryan Carter</title>
    <description>The latest articles on DEV Community by Ryan Carter (@copypastepray).</description>
    <link>https://dev.to/copypastepray</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446879%2F1afae5ef-6823-4a50-a88a-d9e94e7df879.jpeg</url>
      <title>DEV Community: Ryan Carter</title>
      <link>https://dev.to/copypastepray</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/copypastepray"/>
    <language>en</language>
    <item>
      <title>Vue Template in VS Code doesn't allow Emmet </title>
      <dc:creator>Ryan Carter</dc:creator>
      <pubDate>Mon, 10 Aug 2020 22:13:37 +0000</pubDate>
      <link>https://dev.to/copypastepray/vue-template-in-vs-code-doesn-t-allow-emmet-1kil</link>
      <guid>https://dev.to/copypastepray/vue-template-in-vs-code-doesn-t-allow-emmet-1kil</guid>
      <description>&lt;p&gt;I've recently been writing in Vue a lot more, and I ran into an issue in VS Code. Vue's  doesn't recognize Emmet abbreviations in VS Code. It doesn't seem like such a big deal I guess, but it makes everything slower when I'm coding and is a bit of an annoyance at best. I found a fix and wanted to share in case you have the same issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Emmet?
&lt;/h2&gt;

&lt;p&gt;If you don't know &lt;a href="https://emmet.io/" rel="noopener noreferrer"&gt;Emmet.io&lt;/a&gt; it allows you to write HTML code in short CSS-like abbreviations and expand it into UI in seconds. For example, I might type something like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

#page&amp;gt;div.logo+ul#navigation&amp;gt;li*5&amp;gt;a{Item $}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h5&gt;
  
  
  Note: this is one of the examples from the emmet website. The brackets with a $ inside allows you to use dynamic values inside your expanded elements.
&lt;/h5&gt;

&lt;p&gt;Hitting tab with Emmet installed will USUALLY give you this, unless you're using Vue:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;div id="page"&amp;gt;
    &amp;lt;div class="logo"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;ul id="navigation"&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Item 5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I use emmet as much as I can, and it really makes life easier. I can make a mess of divs all in one line and hit tab to ensure every semantically-elegant developer hates me for all time. Sorry devs, old habits die hard. Divs are just easier sometimes to get things done when I don't need to fight with the default styles on ULs and LIs, etc. Sometimes semantics are just that, semantics. Don't @ me. #sorrynotsorry&lt;/p&gt;

&lt;p&gt;Anyway, to get Vue to play nice with VS Code, and particularly Emmet inside the Vue  tag, you apparently can install a great Vue addon called Vetur, and then modify the emmet section of your user settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing VS Code Addons
&lt;/h2&gt;

&lt;p&gt;In case you're new to VS Code, here's how to install the Vetur addon. If you've done this before, feel free to skip this part. You'll want to continue down at the "Updating your Emmet User Settings" heading below.&lt;/p&gt;

&lt;h5&gt;
  
  
  Note: Apologies but in this case I'm using Windows to develop. Not preferred, but Mac and Linux are very similar if you're using them.
&lt;/h5&gt;

&lt;h3&gt;
  
  
  To install Vetur:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8gzmpavwmfewejcjityb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8gzmpavwmfewejcjityb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, type your search and click install. It may not be the first listing, but you want the one by Pine Wu. There are a few others that are not the right one, FYI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6lmdmfp8yg00p63rqcbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6lmdmfp8yg00p63rqcbx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Updating your Emmet User Settings
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Go To File &amp;gt; Preferences &amp;gt; Settings
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fls7mzskmjpjul3u1jlan.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fls7mzskmjpjul3u1jlan.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Search for "Emmet: Syntax" and click the "edit settings.json" link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmntsptndo2kh8se7j7ln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmntsptndo2kh8se7j7ln.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Edit settings.json
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;add the emmet.syntaxProfiles property if it doesn't exist already. &lt;/li&gt;
&lt;li&gt;Be sure to add a comma if there isn't one between the last property and the new emmet block. &lt;/li&gt;
&lt;li&gt;Be sure to save the settings file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdqofdl0sodsxzyunr336.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdqofdl0sodsxzyunr336.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fair warning: Your list of properties will probably look different from mine.&lt;/p&gt;

&lt;p&gt;You may need to close VS Code, and reopen (after saving the settings file) to be sure things loaded in correctly, but now you should be able to use Emmet code expansion inside the Vue  tag. This should also work if you're writing &lt;a href="https://gridsome.org/" rel="noopener noreferrer"&gt;Gridsome&lt;/a&gt; or &lt;a href="https://nuxtjs.org/" rel="noopener noreferrer"&gt;Nuxt.js&lt;/a&gt;, since they are also pretty much just Vue code structured differently  with some extras. &lt;/p&gt;

&lt;p&gt;It does seem like there may be a few edge cases related to this for some people, but this wasn't my issue. The above fix is what worked for me so I wanted to share if you have the same thing.&lt;/p&gt;

&lt;p&gt;Thanks for reading and Happy Coding!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>html</category>
      <category>vue</category>
    </item>
    <item>
      <title>Git: Your Email is not a member of team!</title>
      <dc:creator>Ryan Carter</dc:creator>
      <pubDate>Tue, 04 Aug 2020 23:24:35 +0000</pubDate>
      <link>https://dev.to/copypastepray/git-your-email-is-not-a-member-of-team-5cpa</link>
      <guid>https://dev.to/copypastepray/git-your-email-is-not-a-member-of-team-5cpa</guid>
      <description>&lt;p&gt;Have you ever seen this kind of message when trying to push code to gitlab (or possibly github, not sure)?&lt;/p&gt;

&lt;h2&gt;
  
  
  The output
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

remote: GitLab: Author 'your@email.com' is not a member of team
 ! [remote rejected] TCKT-1234 -&amp;gt; TCKT-1234 (pre-received hook declined)
error: failed to push some refs to 'git@gitlab.com/reponame'


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Only I never added my personal git email ID to this machine, at least not that I remember. Look it's been "a year", okay? Too much going on. So how did this happen? Better than that, how do you fix it? Quick! I was supposed to push this an hour ago and things are  broken. Ahhhh! I hate it when I have the dumb.&lt;/p&gt;

&lt;p&gt;If you have the same problem, I know how you feel. I had the same problem too. I will likely have it again at some point, who knows?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcwib7oy0fxj5kn2pziys.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcwib7oy0fxj5kn2pziys.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the issue?
&lt;/h2&gt;

&lt;p&gt;The issue is that another git ID got onto my computer somehow. Maybe I was exploring and trying out a new technology, signed into it with my personal git account, I backed out, or I fiddled with my settings for another project. Whatever the case, the damage was already done. To be honest, I don't even remember. #2020&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I tried:
&lt;/h2&gt;

&lt;p&gt;First I thought, okay, well, maybe I got the wrong ID in my config. I'll just reset it. So I did.&lt;/p&gt;

&lt;h3&gt;
  
  
  Global Git Config Settings:
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In terminal:
git config --global user.name "John Doe"
git config --global user.email "john@doe.org"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;that didn't work, so I tried to do locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local (this repo only) Git Config Settings:
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In terminal:
git config --local user.name "John Doe"
git config --local user.email "john@doe.org"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This MUST fix it right? Wrong author, so I reset the author. Makes sense? I tried to push again, same issue. Why? It turns out the latest commit was fine, but not the &lt;em&gt;second to last commit&lt;/em&gt; I made. That one was a mistake. Clearly.&lt;/p&gt;

&lt;p&gt;So what to do? Git log held the answer. Seems like I knew this at one point but hadn't needed it in a while so I forget how helpful it is. Log is a super useful command.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to fix it:
&lt;/h2&gt;

&lt;h1&gt;
  
  
  1. Check git log to see your last commits
&lt;/h1&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In terminal:
git log


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and I got a print out of all my recent commits. Screenshot redacted to protect client information security.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgp9bef34mnkps7dy61dl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgp9bef34mnkps7dy61dl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Copy the commit ID
&lt;/h1&gt;

&lt;p&gt;The next step is to copy the commit ID from the one you want to change. The one with the wrong email on it. &lt;/p&gt;

&lt;h1&gt;
  
  
  3. git rebase
&lt;/h1&gt;

&lt;p&gt;Then you want to run this to start the edit:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In terminal:
git rebase -i 975479bb630b8495ac44d8a95c4e056c989b5a04


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Where your commit ID is 975479bb630b8495ac44d8a95c4e056c989b5a04.&lt;/p&gt;

&lt;p&gt;You should see it open your default text editor and give you a line with pick at the beginning.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In Nano/Vim/text editor:
pick 1a2b3c commit message here


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Change the "pick" to "edit" and be sure not to delete the space after edit. It should read: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In Nano/Vim/text editor:
edit 1a2b3c commit message here


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;where 1a2b3c is the shorter version of the commit ID (it is auto added for you, don't need to add it yourself)&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Save the File.
&lt;/h1&gt;

&lt;p&gt;Now you're in "edit" mode for this commit.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Update the author info with this:
&lt;/h1&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In Terminal:
git commit --amend --author="Your Name &amp;lt;correctemail@company.com&amp;gt;"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If that goes well, then you continue the rebase with this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In Terminal:
git rebase --continue


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If it doesn't go well, I would google the error that you get and see if you can find more info on it. Usually I learn more this way than any other.&lt;/p&gt;

&lt;p&gt;Once you solve any issues, you should see something like this: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# In Terminal:
Successfully rebased and updated refs/heads/develop.


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This is how you know things worked with the rebase. Now you can push your branch or merge or whatever you were trying to do before.&lt;/p&gt;

&lt;p&gt;I did see a few good tutorials out there, but none that had the whole process, so I tried to piece this together from a few of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Warning:
&lt;/h3&gt;

&lt;p&gt;Please be careful with rebasing. You normally shouldn't need to rebase much, and if you leave off the commit id you can end up rewriting the repo's history which will cause more issues. to learn more about what a rebase is and does, check out &lt;a href="https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase" rel="noopener noreferrer"&gt;Atlassian's very good rebase article&lt;/a&gt; with pictures!&lt;/p&gt;

&lt;p&gt;I'm a long time developer, but I'm learning new stuff every day, which is what I find most attractive about programming. &lt;/p&gt;

&lt;p&gt;Let me know what you think of my first article and how you think I might improve it. Thanks for your feedback.&lt;/p&gt;

</description>
      <category>git</category>
      <category>commandline</category>
      <category>gitlab</category>
      <category>config</category>
    </item>
  </channel>
</rss>
