Compare commits

..

10 Commits

Author SHA1 Message Date
3b66eddf40 feat: Update vim config 2026-03-08 10:23:20 +05:30
603de94d16 Configure Vundle and add Go development plugins
Added Vundle plugin manager and Go development settings.
2026-02-28 04:02:19 +05:30
8cdeae97d7 Update C enhancements in vimrc 2024-10-28 16:26:41 +05:30
f02051370a Update COPYING with BSD 2 simple license 2024-10-26 14:21:03 +00:00
1759d1de7f Add vimrc config just for C programming 2024-10-26 14:18:40 +00:00
743dd2e513 Add some nuance to README 2024-10-11 18:50:21 +05:30
80d9d63689 Add LICENSE detail 2024-10-11 18:48:05 +05:30
e199750ce0 Update .xroot.sh and .vimrc 2024-08-28 16:01:04 +05:30
Nirmal Kumar R
f07730b167 Update vim colorscheme to shine 2024-08-19 14:17:42 +05:30
Nirmal Kumar R
bd8d85f227 Remove README 2024-08-19 14:02:53 +05:30
6 changed files with 153 additions and 31 deletions

108
.vimrc
View File

@@ -1,9 +1,26 @@
set nocompatible set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" onedark colorscheme
Plugin 'joshdick/onedark.vim'
" Ag
Plugin 'rking/ag.vim'
" Go development plugin
Plugin 'fatih/vim-go'
call vundle#end()
set laststatus=2 set laststatus=2
set t_Co=256 set t_Co=256
set encoding=utf-8 set encoding=utf-8
set autoindent set autoindent
set smartindent
set magic set magic
set number set number
set scrolloff=3 set scrolloff=3
@@ -23,42 +40,17 @@ set mouse=a
set noswapfile set noswapfile
set nofoldenable set nofoldenable
set lazyredraw set lazyredraw
set t_Co=256
filetype on filetype on
filetype plugin on filetype plugin on
filetype indent on filetype indent on
syntax enable syntax enable
highlight Normal ctermfg=none ctermbg=none
highlight NonText ctermfg=none ctermbg=none
highlight EndOfBuffer ctermfg=none ctermbg=none
highlight TabLineFill ctermfg=none ctermbg=none
highlight Search ctermbg=12
highlight NonText ctermfg=darkgrey
highlight SpecialKey ctermfg=darkgrey
highlight clear SignColumn
highlight Comment cterm=bold ctermfg=none
highlight StatusLine cterm=none ctermbg=none ctermfg=darkgrey
highlight StatusLineNC cterm=none ctermbg=none ctermfg=darkgrey
highlight Title cterm=none ctermfg=darkgrey
highlight TabLineFill cterm=none
highlight TabLine cterm=none ctermfg=darkgrey ctermbg=none
highlight ColorColumn ctermbg=darkgrey guibg=lightgrey
highlight Todo ctermbg=NONE ctermfg=red cterm=bold
highlight PreProc ctermfg=grey
highlight String ctermfg=lightblue cterm=italic
highlight Type ctermfg=cyan
highlight lineNr ctermfg=grey cterm=italic
highlight cIncluded ctermfg=NONE cterm=bold
highlight pythonInclude ctermfg=blue
highlight pythonConditional ctermfg=darkcyan
highlight pythonBuiltin ctermfg=darkcyan
highlight Pmenu ctermbg=white ctermfg=black
highlight PmenuSel ctermbg=darkcyan ctermfg=black
autocmd FileType markdown setlocal tw=80 et ts=2 sw=2 autocmd FileType markdown setlocal tw=80 et ts=2 sw=2
autocmd FileType text setlocal tw=80 autocmd FileType text setlocal tw=80
autocmd FileType c,cpp set formatoptions+=ro autocmd FileType c,cpp set tabstop=4 shiftwidth=4 expandtab
autocmd FileType c set omnifunc=ccomplete#Complete autocmd FileType c set omnifunc=ccomplete#Complete
autocmd FileType html,xhtml,css,xml,xslt set shiftwidth=2 softtabstop=2 autocmd FileType html,xhtml,css,xml,xslt set shiftwidth=2 softtabstop=2
autocmd FileType vim,lua,nginx set shiftwidth=2 softtabstop=2 autocmd FileType vim,lua,nginx set shiftwidth=2 softtabstop=2
@@ -68,4 +60,64 @@ autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0 autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0
autocmd FileType asm set noexpandtab shiftwidth=8 softtabstop=0 syntax=nasm autocmd FileType asm set noexpandtab shiftwidth=8 softtabstop=0 syntax=nasm
" Golang customizations
let g:go_fmt_command = "goimports"
let g:go_fmt_fail_silently = 1
let g:go_bin_path = expand("$HOME/go/bin")
let g:go_auto_type_info = 1
" Syntax Highlighting for Golang
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
" Go keymaps
" Type Info
au FileType go nmap <Leader>i <Plug>(go-info)
" GoDoc
au FileType go nmap <Leader>gd <Plug>(go-doc)
au Filetype go nmap <Leader>gv <Plug>(go-doc-vertical)
" Build/Run/Test
au FileType go nmap <Leader>r <Plug>(go-run)
au FileType go nmap <Leader>b <Plug>(go-build)
au FileType go nmap <Leader>t <Plug>(go-test)
" GoDef
au FileType go nmap gd <Plug>(go-def)
au FileType go nmap <Leader>gs <Plug>(go-def-split)
au FileType go nmap <Leader>gv <Plug>(go-def-vertical)
au FileType go nmap <Leader>gt <Plug>(go-def-tab)
" Enhanced keyboard mappings
"
" in normal mode F2 will save the file
nmap <F2> :w<CR>
" in insert mode F2 will exit insert, save, enters insert again
imap <F2> <ESC>:w<CR>i
" switch between header/source with F4
map <F4> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR>
map <F5> :make<CR>
map <F6> :make clean all<CR>
" The Silver Searcher
" bind \ (backward slash) to grep shortcut
command -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
nnoremap \ :Ag<SPACE>
set notermguicolors set notermguicolors
" Solarized stuff
"let g:solarized_termtrans=1
"let g:solarized_contrast='high'
let g:enable_bold_font = 1
let g:enable_italic_font = 1
let g:hybrid_custom_term_colors = 1
let base16colorspace=256
set background=dark
colorscheme onedark
highlight CursorLine cterm=BOLD ctermbg=235 ctermfg=NONE

46
.vimrc-alt Normal file
View File

@@ -0,0 +1,46 @@
" disable vi compatibility
set nocompatible
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" use indentation of previous line
set autoindent
" use intelligent indentation for C
set smartindent
" configure tabwidth and insert spaces instead of tabs
set tabstop=4 " tab width is 4 spaces
set shiftwidth=4 " indent also with 4 spaces
set expandtab " expand tabs to spaces
set cc=80
" turn syntax highlighting on
set t_Co=256
syntax on
" :color shine
:colorscheme jellybeans
" turn line numbers on
set number
" highlight matching braces
set showmatch
" Enhanced keyboard mappings
"
" in normal mode F2 will save the file
nmap <F2> :w<CR>
" in insert mode F2 will exit insert, save, enters insert again
imap <F2> <ESC>:w<CR>i
" switch between header/source with F4
map <F4> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR>
map <F5> :make<CR>
map <F6> :make clean all<CR>

View File

@@ -2,6 +2,7 @@
export DISPLAY=:0 export DISPLAY=:0
DATE=$(/bin/date +'%a - %Y.%m.%d | %I:%M %p') DATE=$(/bin/date +'%a - %Y.%m.%d | %I:%M %p')
WiFi=$(iwgetid -r)
ROOT="$DATE" ROOT="<i> $WiFi | $DATE"
xsetroot -name "$ROOT" xsetroot -name "$ROOT"

24
COPYING Normal file
View File

@@ -0,0 +1,24 @@
BSD 2-Clause License
Copyright (c) 2024, Nirmal Kumar R <tildezero@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1
README Normal file
View File

@@ -0,0 +1 @@
dotfile of sort

View File

@@ -1,2 +0,0 @@
# dotfiles
Contains dotfiles for utilities that I use.