Skip to content

Instantly share code, notes, and snippets.

@ubuntupunk
Created June 23, 2025 21:23
Show Gist options
  • Save ubuntupunk/853b4fb6b83141837f14f649a813b311 to your computer and use it in GitHub Desktop.
Save ubuntupunk/853b4fb6b83141837f14f649a813b311 to your computer and use it in GitHub Desktop.
Portable Lightweight VIMRC
set nocompatible " Disable vi compatibility
filetype plugin indent on " Enable filetype detection
syntax on " Enable syntax highlighting
" Colorscheme and appearance
colorscheme desert " Clean, attractive colorscheme
set background=dark " Dark background for better contrast
set number " Show line numbers
set cursorline " Highlight current line
set showmatch " Highlight matching brackets
" Indentation and tabs
set tabstop=4 " Width of a tab
set shiftwidth=4 " Width for auto-indents
set expandtab " Convert tabs to spaces
set autoindent " Auto-indent new lines
set smartindent " Smart indentation for code
" Python-specific settings
autocmd FileType python setlocal softtabstop=4
autocmd FileType python setlocal formatoptions-=r " Disable auto-comment on new lines
autocmd FileType python setlocal colorcolumn=80 " Highlight column 80 for PEP 8
" Search and navigation
set incsearch " Incremental search
set hlsearch " Highlight search results
set ignorecase " Case-insensitive search
set smartcase " Case-sensitive if uppercase used
" General usability
set wildmenu " Enhanced command-line completion
set backspace=indent,eol,start " Fix backspace behavior
set encoding=utf-8 " Use UTF-8 encoding
set ruler " Show cursor position
set laststatus=2 " Always show status line
" Key mappings
nnoremap <leader>c :nohlsearch<CR> " Clear search highlights
nnoremap <leader>s :w<CR> " Quick save
@ubuntupunk
Copy link
Author

ubuntupunk commented Jun 23, 2025

#!/bin/bash
echo "Fetching .vimrc from Gist..."
curl -o ~/.vimrc https://gist.githubusercontent.com/ubuntupunk/853b4fb6b83141837f14f649a813b311/raw/2375442437de0e9cadf6e81e4abb15eb5cefb257/.vimrc
if [ $? -eq 0 ]; then
    echo ".vimrc installed successfully!"
else
    echo "Error: Failed to fetch .vimrc. Check the Gist URL or internet connection."
    exit 1

fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment