Changing the Default Terminal to Terminator on Ubuntu

Image
Terminator is a powerful tool for developers, allowing you to manage multiple terminal sessions in a single window. Features like splitting panes, tabs, and simultaneous input can significantly boost your productivity. Step 1: Install Terminator First, install Terminator using the apt package manager. sudo apt update sudo apt install terminator -y The -y option automatically answers 'yes' to any prompts during the installation process, streamlining the setup. Step 2: Set as the System Default Ubuntu uses a utility called update-alternatives to manage default applications. We'll use this tool to change the default terminal emulator ( x-terminal-emulator ) to Terminator. Run the Configuration Command Enter the following command in your terminal. A list of available terminals will appear. sudo update-alternatives --config x-terminal-emulator Select Terminator From the resulting list, enter the selection number corresponding to terminator and press Enter. ...

Setting Up Vim with vim-plug on Ubuntu

This walkthrough will guide you through setting up Vim with vim-plug, a minimalist Vim plugin manager, on your Ubuntu system. This setup will enhance your Vim experience with useful plugins and configurations.

Step 1:  Create Necessary Directories

First, we'll create the necessary directories for backups, swap files, and undo history.


  $ mkdir -p ~/.vim/backup ~/.vim/swap ~/.vim/undo


Step 2: Install vim-plug

download the plug.vim script from the vim-plug GitHub repository and save it to the ~/.vim/autoload/ directory.


  $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim


Step 3: Configure .vimrc

Copy the following settings into the ~/.vimrc file in your Linux (Ubuntu) user account


  " Basic settings
 
  set hlsearch " Highlight search results
  set nu " Show line numbers
  set autoindent " Enable automatic indentation
  set scrolloff=2
  set wildmode=longest,list
  set tabstop=4 " Set tab width
  set shiftwidth=4 " Set indentation width
  set expandtab " Use spaces instead of tabs
  set smartindent " Enable smart indentation
  set cindent " Enable C-style indentation
  set smartcase " Case-insensitive search unless uppercase is used
  set incsearch " Show matching results while typing search query
  set backspace=eol,start,indent " Enable backspace in insert mode
  set history=256 " Set command history length
  set laststatus=2 " Always display the status line
  set showmatch " Highlight matching parentheses
 
  " File encoding settings
 
  set encoding=utf-8
  set fileencoding=utf-8
  set fileencodings=ucs-bom,utf-8,cp949,latin1
 
  " UI settings
 
  set ruler " Show the cursor position
  set statusline=%<%l:%v\ [%P]%=%a\ %h%m%r\ %F\
  colorscheme codeschool " Set color scheme
 
  " Backup and undo settings
 
  set backup " Enable backup file creation
  set undofile " Save undo history to file
  set backupdir=~/.vim/backup// " Set backup file directory
  set directory=~/.vim/swap// " Set swap file directory
  set undodir=~/.vim/undo// " Set undo file directory
 
  " Enable syntax highlighting
 
  if has("syntax")
    syntax on
  endif
 
  " Locale settings
 
  let $LANG = 'ko_KR.UTF-8'


Step 4: Install Plugins

Open Vim and install the plugins by running the following command


  $ vim +PlugInstall +qall


The command "vim +PlugInstall +qall" is used to open Vim and automatically install the plugins specified in the .vimrc file using vim-plug.

+PlugInstall
  • This is an Ex command passed to Vim when it starts up.
  • PlugInstall is a command provided by vim-plug that installs all plugins listed in the .vimrc file.
+qall
  • This is another Ex command that tells Vim to quit all open windows.
  • After installing the plugins with PlugInstall, +qall will close Vim.




Comments

Popular posts from this blog

Resolving Key Exchange Failure When Connecting with SecureCRT to OpenSSH

SecureCRT] How to Back Up and Restore SecureCRT Settings on Windows

How to Set Up Vaultwarden (Bitwarden) on Synology NAS (Best Free Alternative to LastPass)