Git Product home page Git Product logo

geany-webdev-snippets's Introduction

Geany WebDev Snippets

Introduction

I was a fan of Notepad++ source code editor, but it doesn't support Linux Operating System. Since I'm also a fan of Linux, so I decided to switch to another lightweight text editor.

Fortunately, I found Geany, a powerful, stable and lightweight programmer's text editor that provides tons of useful features without bogging down your workflow. It runs on Linux, Windows and macOS is translated into over 40 languages, and has built-in support for more than 50 programming languages.

However, Geany doesn't have Emmet plugin for now. So for speeding up the workflow of my daily web development, I decided to make my version of web development snippets for Geany. And I made it, it's not perfect but "as long as it's simple, it makes your life simple". For those who want to use it as your web development snippets in Geany, I made an instruction below for you guys on how to add snippets into Geany.

Getting Started

Step 1: Copy the example snippets that you need from snippets.conf

Step 2: Open Geany and go to Tools -> Configuration Files -> snippets.conf

Step 2

Step 3: Paste to the [HTML] and/or [JavaScript] and/or [PHP] based on what language you wanted to replace

Step 3

Step 4: Press CTRL+S to save it

How to use snippet

Step 1: Type the snippet keyword

Use Step 1

Step 2: Press Tab and it will autocomplete the whole template for you

Use Step 2

Setup Keybinding (Recommended)

I highly recommend you guys to setup keybinding for Move cursor in snippet because it's very useful and convenient when using snippets.

Step 1: Go to Edit -> Preferences

Snippet Step 1

Step 2: Go to Keybindings and select Move cursor in snippet, then click Change

Snippet Step 2

Step 3: Press CTRL+] and click OK

Snippet Step 3

Step 4: Click OK again

Snippet Step 4

How to Use Keybinding

Before using the keybinding, you guys have to setup first and may refer to Setup Keybinding (Recommended).

Step 1: Type the snippet keyword

Snippet Use 1

Step 2: Press Tab and it will autocomplete the whole template for you

Snippet Use 2

Step 3: Type something inside the switch(_)

Snippet Use 3

Step 4: Press CTRL+] and it will jump to the next _

Snippet Use 4

Now you can just straight type something inside the _ without manually select or highlight the _ because it's already being selected and highlighted after pressing CTRL+] just now.

Adding syntax highlighting & html snippets for .vue filetype (Optional)

Step 1: Go to Tools -> Configuration Files -> filetype_extensions.conf

Vue Step 1

Step 2: Remove #~ # from #~ # [Extensions]

Now it should be look like [Extensions]

Vue Step 2

Step 3: Remove #~ from #~ HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;

Now it should be look like HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;

Step 4: Then add *.vue; to HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;

Now it should be look like HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;*.vue;

Vue Step 4

Step 5: Press CTRL+S to save it

Summary

If you follow my instructions above, you will be able to use the snippets. Hope it helps you. Feel free to open issue if you have any issues.

geany-webdev-snippets's People

Contributors

zhaolinlau avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.