How to install Betty Linter with VIM & EMACS - Betty Coding Style Tutorial & Tips

Поділитися
Вставка
  • Опубліковано 27 сер 2024
  • ALX Betty Coding Style Tutorial - Installation, Indentation, Braces, Spaces, Editors etc ALX
    How to install Betty Linter with VIM & EMACS - Betty Coding Style Tutorial & Tips
    --
    Installing Betty
    Goto Betty Repo (github.com/hol...)
    Clone the REPO
    cd into the REPO
    Install linter with sudo ./install.sh
    Create a file (betty) with VIM or EMACS or put in the code, save and exit
    Change permission to all users chmod a+x betty
    Move file to bin : sudo mv betty /bin/
    --
    --
    Betty File Code
    #!/bin/bash
    Simply a wrapper script to keep you from having to use betty-style
    and betty-doc separately on every item.
    Originally by Tim Britton (@wintermanc3r), multiargument added by
    Larry Madeo (@hillmonkey)
    BIN_PATH="/usr/local/bin"
    BETTY_STYLE="betty-style"
    BETTY_DOC="betty-doc"
    if [ "$#" = "0" ]; then
    echo "No arguments passed."
    exit 1
    fi
    for argument in "$@" ; do
    echo -e "
    ========== $argument =========="
    ${BIN_PATH}/${BETTY_STYLE} "$argument"
    ${BIN_PATH}/${BETTY_DOC} "$argument"
    done
    --
    --
    VIM Code
    Vim ~/.vimrc
    set tabstop=8 shiftwidth=8
    set autoindent
    set smartindent
    set cindent
    syntax enable
    set number
    set colorcolumn=80
    --
    --
    EMACS Code
    emacs ~/.emacs
    (setq c-default-style "bsd"
    c-basic-offset 8
    tab-width 8
    indent-tabs-mode t)
    (require 'whitespace)
    (setq whitespace-style '(face empty lines-tail trailing))
    (global-whitespace-mode t)
    (setq column-number-mode t)
    (global-display-line-numbers-mode)
    ALX Betty Coding Style Tutorial - Installation, Indentation, Braces, Spaces, Editors etc ALX

КОМЕНТАРІ • 28

  • @Amirak254
    @Amirak254 Рік тому

    Continue the good work 🎉

  • @nanaot942
    @nanaot942 Рік тому

    You are a life saver, Ggod bless you 🙏

  • @miriamikechukwu4141
    @miriamikechukwu4141 11 місяців тому

    life saver boss
    Thanks a lot

  • @ebukaobobo2200
    @ebukaobobo2200 Рік тому

    Thank you for the vids boss, it is very much appreciated

    • @clickateacademy
      @clickateacademy  Рік тому

      Glad you like them!

    • @runyangarba1062
      @runyangarba1062 Рік тому

      Thanks for your effort in teaching us all these. Please I couldn't sudo into install.sh and the error message is "command not found"
      I could also see an ' * ' on the content of Betty. What do I do?

  • @danielnyakundi9879
    @danielnyakundi9879 10 місяців тому

    I have a problem. Betty does not allow splitting strings between lines and also it doesn't allow more than 80 characters per line. How you do manage to to that in case a string you are supposed to post is longer than 80 characters?

  • @mostafashapan8173
    @mostafashapan8173 Рік тому

    amazing bro, the sign ~ name is tilde

  • @Amirak254
    @Amirak254 Рік тому

    You just saved I __ all-day dis hav distabed I.

  • @sley530
    @sley530 Рік тому

    Good job!

  • @chimmuanyaijezie4049
    @chimmuanyaijezie4049 Рік тому

    Thank you for this

  • @laelafsirak8978
    @laelafsirak8978 Рік тому

    ThankYou!!

  • @wisdomhonest4511
    @wisdomhonest4511 Рік тому

    I installed d betty repo and created the betty file. While in step five my laptop shutdown..
    1.pls how to i countinue from step 5. On the Terminal.
    2. Also how did u save ur betty file in step which key did u enter to save?
    Pls

  • @nantomakanda
    @nantomakanda Рік тому

    How can we get your slides

  • @clariceibeawuchi2084
    @clariceibeawuchi2084 Рік тому

    Please, how are you using tab, is it same as clicking space on your keyboard?

  • @mosesolamide6273
    @mosesolamide6273 Рік тому

    I have issue with the vimrc file.
    Previously. when typing my comment, the next line comes with the star * but after setting the vimrc configuration, the next line does not come with the *... Example below:
    Previously:
    /**
    *
    *
    */
    After vimrc configuration:
    /**


    /

    • @clickateacademy
      @clickateacademy  Рік тому

      Maybe a setting was wrong

    • @Zahari_tech
      @Zahari_tech Рік тому

      I also faced the same problem so I deleted the ~/.vimrc file. And it worked.
      Using ubuntu 20.4

  • @clariceibeawuchi2084
    @clariceibeawuchi2084 Рік тому

    Please, can the /.vimrc configuration be removed??? If yes, how please

    • @clickateacademy
      @clickateacademy  Рік тому +2

      rm ~/.vimrc
      Why do you want to remove it by the way.

  • @nwokoonyinye255
    @nwokoonyinye255 Рік тому

    thanks sir but why did sudo command not work on my git bash

    • @melchizedek79
      @melchizedek79 Рік тому

      git bash does not have all the Linux command, try using vagrant or WSL or a machine with a Linux environment. WSL = Windows Subsystem for Linux.

    • @wanduluelijah234
      @wanduluelijah234 Рік тому

      Use the linux terminal it will work not git bash

  • @nkeirulois5607
    @nkeirulois5607 Рік тому

    thank clickate