Please read the new rule regarding the restriction on the use of AI tools. ×

majju's blog

By majju, history, 5 weeks ago, In English

Hello,

I started to use geany as a text editor. I've setup everything except the snippet. In sublime text, when you type in a certain trigger, a prewritten code is included. Is there anything similar in geany ?

Edit : I use mac 2020 m1 chip

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Yes,you can search for how to use it.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Didn't find anything online that works in a mac

»
5 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it
  1. delete geany
  2. use Clion
  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Not as lightweight tho.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Don't like to use IDEs

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it -22 Vote: I do not like it
    1. Go out
    2. perform Su***de
    3. Ask to be cremated since u ain't worth the effort of burial
  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    ide's are kinda hard. if u have an old comp, vim/geany/emacs is better. + those are very easly customizable so it will fit ur prefrence

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

interesting, is it similur to vim? cause i use vim

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Link This is what I got at max when i was trying to configure it myself. then I just stored all my snippets in a .cpp file and i copy them when in need.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I tried what was there in the link. It doesn't work

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Go to tools > Configuration files > snippets.conf

Add new snippet, and use it with tab

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

write a script thats how I use it at least.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How to do that ?

    • »
      »
      »
      4 weeks ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      .

    • »
      »
      »
      4 weeks ago, # ^ |
      Rev. 5   Vote: I like it 0 Vote: I do not like it

      This is the code in the script. template.cpp is my template file

      !/bin/bash

      file_name=$1

      cat template.cpp > "$file_name" # Copy template to new file

      geany "$file_name"

      I run the following command when I want to open a new file. ./cr.sh A.cpp A.cpp can be anything

      Idk why the above code looks weird!!

»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

use ideone instead

»
4 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it
Method which worked for me
»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by majju (previous revision, new revision, compare).