Vim : change current working directory

When we work with vim, usually it will start with our current home directory. If we want to change global working directory of vim to the current edited file, we can do by executing :cd %:p:h and it will show the directory it changed to. To change only for the current window we can do :lcd %:p:h. I like to use :split command to edit minimal 2 file and :lcd will come handy if we will work on multiple directory also.

Thats all. Keep it simple. Step by step.

Compile Minimum Profit 5.41 under Ubuntu 20

  1. Get mp-5.4.1 source code from https://triptico.com/software/mp.html
  2. Install build-essential package (sudo apt install build-essential)
  3. Install libncurses-dev (sudo apt install libncurses-dev)
  4. Install libgtk-3-dev (sudo apt install libgtk-3-dev)
  5. Copy mpdm folder from mp-5.4.1 folder to parent folder.
  6. open terminal goto mp-5.4.1 folder and run ./config.sh
  7. Check if gtk and ncurses driver registered by config script.
  8. Type make to compile.
  9. Type make install to install the mp-5 executable.

Emacs : accessing menu bar

Lately im struggling to find how we can access emacs menu bar. Its visible on top of screen but i cant do anything on it. The menu bar can not be clicked by mouse (im installing no x emacs anyway and open it on mate terminal). Alt key will access mate terminal menu bar … hmm so i cant use alt key. Later i tried Esc key and its work. Press Esc then release, then press ` (backtick, key below Esc) and voila prompt will show on the bottom screen. We can browse using arrow key or page up to go to page containing menu link above the prompt. Press enter to execute selected menu or link. Its better not to memorize Emacs key binding and use menu, isnt it ?

Minimum Profit : A Programmer Text Editor

Minimum Profit is a text editor for programmer available to download from https://triptico.com/software/mp.html. I accidentally found this software from article related to OpenBSD and the author is the creator of this mp editor. The downloads are available in source and windows executable (Wow).

I managed to compile mp 5.38 on debian 10 using ncursesw driver which is already available on my laptop. Compilation step as follow.

Continue reading “Minimum Profit : A Programmer Text Editor”

Playing with Emacs – Open file, edit, save file.

Emacs is an editor, but not just it. Thats what i read on internet. Emacs like in a battle with Vim, another editor. I have play with vi so many years ago, but with emacs  it is just recently i learned to use it basic function.

Install it on ubuntu we can choose GUI or terminal version. I like the terminal version because it will be handy during my engagement with VM/Cloud which only can use terminal to manage it.

Open Emacs by typing on terminal emacs and press enter, it will show a welcome page like below.

We can move cursor to a hyperlink and press enter to go to particular subject, like tutorial or manual. Tutorial can also accessed using key combination C-h t, which mean press Ctrl and hold then press h, release keys, then press t. C is Ctrl and M is Meta (Alt/Esc).

Continue reading “Playing with Emacs – Open file, edit, save file.”

Create text file with ed

Unix alike system have ed for editing text file which is i feel strange at first. I learned some time ago to create small text file out of curiosity.

Lets try by creating a text file containing 3 lines.

  1. type ed on terminal
  2. type a then enter (a is append command in ed)
  3. type your text file content.
  4. To end input mode type . then enter on a line.
  5. Type w filename.txt then enter to save to a file.
  6. Type q to quit from ed.

Here we will show in a terminal.

jEdit

jEdit is a java based editor for programmer, so it will run on many platform : windows, linux, mac.

First download jEdit installer from the web.

I choose to download java based installer and start it on my windows based laptop.

After a while a dialog will show up.

 

Continue reading “jEdit”