Compare commits
10 Commits
0e14d6da09
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b66eddf40 | |||
| 603de94d16 | |||
| 8cdeae97d7 | |||
| f02051370a | |||
| 1759d1de7f | |||
| 743dd2e513 | |||
| 80d9d63689 | |||
| e199750ce0 | |||
|
|
f07730b167 | ||
|
|
bd8d85f227 |
108
.vimrc
108
.vimrc
@@ -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 t_Co=256
|
||||
set encoding=utf-8
|
||||
set autoindent
|
||||
set smartindent
|
||||
set magic
|
||||
set number
|
||||
set scrolloff=3
|
||||
@@ -23,42 +40,17 @@ set mouse=a
|
||||
set noswapfile
|
||||
set nofoldenable
|
||||
set lazyredraw
|
||||
set t_Co=256
|
||||
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
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 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 html,xhtml,css,xml,xslt 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 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
|
||||
|
||||
" 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
46
.vimrc-alt
Normal 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>
|
||||
@@ -2,6 +2,7 @@
|
||||
export DISPLAY=:0
|
||||
|
||||
DATE=$(/bin/date +'%a - %Y.%m.%d | %I:%M %p')
|
||||
WiFi=$(iwgetid -r)
|
||||
|
||||
ROOT="$DATE"
|
||||
ROOT="<i> $WiFi | $DATE"
|
||||
xsetroot -name "$ROOT"
|
||||
|
||||
24
COPYING
Normal file
24
COPYING
Normal 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.
|
||||
Reference in New Issue
Block a user