Skip to content

These REPO contains all ALX resources, with Additional Material i found useful during my course of Study in ALX

License

Notifications You must be signed in to change notification settings

Innocentsax/ALX-RESOURCES_FROM_BEGINNER_TO_ADVANCE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALX-RESOURCES_FROM_BEGINNER_TO_ADVANCE


WELCOME TO ALX

MONTH 1

EMACS GUIDE

Emacs


VIM GUIDE

Vim

Vi/Vim/Nvim keys and shortcuts

Coming from a click, touch, drag and drop world, command line tools and navigation might seem tricky at first. Don't fret. They are not difficult to learn, they are just not intuitive yet. As you use them daily, they will become a part of you. Vi has two primary modes:

  1. Command mode: Let's you execute commands like save, quit, formats, e.t.c.
  2. Insert mode: When you type to populate a file.

To tell what mode you are in, watch the bottom left corner of your screen. Command mode displays nothing. Insert mode displays:

---INSERT---

When you open Vi, the default mode is the command mode. To start typing, press 'i' to enter into insert mode. Press ESC key to go back into command mode.

How to exit Vi:

You must be in command mode to execute these commands.

To quit an unedited document:

:q

To quit an edited document without saving changes:

:q!

To save progress without quitting

:w

To save and quit

:wq or :x

Other great commands:

  • :set number - This command displays the numbering for each line. Makes it easy to trace mistakes and debug code.
  • gg - Takes the cursor to the top of the file. Faster way to navigate than using arrow keys.
  • dd - Deletes the entire line where the cursor is placed. Faster than delete or backspace button. Can also be used to paste the line elsewhere when you press 'p'.
  • ?keyword - Used to search keywords in a document. For example, ?printf will look for all instances of 'printf'. If there are multiple instances, use 'n' and 'N' to jump between them forwards or backwards respectively.

How to debug code in the command line using vi:

  1. Here's a simple code sample that prints a statement three times. Please note that this code was written specifically for demonstration purposes. The file name is saved as 'debug.c'

0 program

  1. When you run a betty check on the code, it gives you an error message. Notice the number '27' in front of the file name 'debug.c:27'. That number is the line number where the error occurred.

1 error message

  1. When you open the code in Vi again, type :set number and pressed Enter to display line numbers in the code. This makes it easy to track line 27.

2  set number

  1. Two errors were flagged. "space prohibited before semicolon" and "void function return statements are not generally useful". For the sake of simplicity, I employed a basic fix.

3 fix error

  1. Now when you run betty again, the code will be error free.

4 error free

  1. To recap, check for the error line, read and understand the error message and address it accordingly. You can always ask your peers to help you interpret error messages that you don't yet understand. I hope this helps, however simplistic it might appear. Keep doing hard things!

5 welcome


SHELL, NAVIGATION


GIT AND GITHUB


SHELL BASICS

From ALX Intranet

Personal Resourses


SHELL PERMISSION

From ALX Intranet

Personal Resourses

Videos Resourses


Shell, init files, variables and expansions

Expansions Shell Arithmetic Variables Shell initialization files The alias Command Technical Writing

C Programming

Personal Resources

Alx Resources

Hello World


Variables, if, else, while

Video Resouses


Functions, nested loops

Video Resources_


C Debugging


Pointers, arrays, and strings


Recursion

Video Resources

Static libraries

C - argc, argv

C - malloc, free

C - Structures, typedef

C - Preprocessor

___ C - Function pointers___

C - Variadic functions

C - printf

C - Dynamic libraries

C - Makefiles

C - Data structures and Algorithms

A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to solve a particular problem.

Linked Lists

C - Stacks, Queues - LIFO, FIFO

C - Hash tables

C - Sorting algorithms & Big O

C - Binary trees

Author

About

These REPO contains all ALX resources, with Additional Material i found useful during my course of Study in ALX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published