Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.0.0 #8

Merged
merged 26 commits into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9859e2a
(chore) cleanup headers and add neovim link
PrashanthaTP Sep 2, 2021
7231c36
(color) use gruvbox
PrashanthaTP Sep 10, 2021
3677cdf
(chore) remove C-W mapping
PrashanthaTP Sep 10, 2021
ac3ab6f
(feat) use vim-commentary,vimwiki
PrashanthaTP Sep 10, 2021
faa2c1d
(feat) add lightline settings
PrashanthaTP Sep 10, 2021
6c240d4
(plug) add telescope settings
PrashanthaTP Sep 10, 2021
219c312
(plug) add vimwiki, nerdtree settings
PrashanthaTP Sep 10, 2021
60a033e
(util) add commands util file
PrashanthaTP Sep 10, 2021
51703f3
(snippets) add c snippets
PrashanthaTP Sep 10, 2021
c1ed246
(feat) add command for replacing with yanked text
PrashanthaTP Sep 11, 2021
ac4ffe1
(feat) show full urls/links
PrashanthaTP Sep 11, 2021
d24c744
(refactor) add seperate file each plugin
PrashanthaTP Sep 11, 2021
a11584a
(feat) add goyo plugin
PrashanthaTP Sep 11, 2021
6860667
(chore) add gruvbox settings
PrashanthaTP Sep 25, 2021
2f5de51
(chore) add git difftool settings
PrashanthaTP Sep 25, 2021
488f783
(plugins) add plugin settings
PrashanthaTP Sep 25, 2021
e0f075c
(chore) add pandoc helper function
PrashanthaTP Sep 25, 2021
e96f507
(chore) add curdir,conceallevel,tabline,lazyredraw settings
PrashanthaTP Sep 25, 2021
649108d
(feat) add Powershell Profile
PrashanthaTP Oct 3, 2021
f008df0
(feat) add bashrc and inputrc
PrashanthaTP Oct 3, 2021
f24d635
(docs) update warnings
PrashanthaTP Oct 3, 2021
e3d17a0
(chore) add vi-cmd-mode-string
PrashanthaTP Oct 9, 2021
805d366
(chore) remove custom PS1
PrashanthaTP Oct 9, 2021
fb858a0
(chore) some tweaks
PrashanthaTP Oct 9, 2021
e19072a
(feat) change configfiles work-tree
PrashanthaTP Oct 9, 2021
e3ff2bf
(feat | refactor) change configfiless work-tree
PrashanthaTP Oct 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
#export TERM=xterm-256color
VISUAL=nvim
EDITOR=nvim
HISTSIZE=1000
HISTFILESIZE=2000
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

# export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
#export PS1="\[\033[35m\]\u@\[\033[32m\]\h \[\033[33m\]\w \[\033[91m\]\$(parse_git_branch)\[\033[00m\]$ "
# PROMPT_COMMAND='echo -e "\e[?16;0;200c"'
alias configfiles='git --git-dir="D:\dotfiles\dotfiles" --work-tree="$LOCALAPPDATA"'
################################################################################################################
# export PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[0;32m\]$(if git rev-parse --git-dir > /dev/null 2>&1; then echo " - ["; fi)$(git branch 2>/dev/null | grep "^*" )\[\033[0;32m\]$(if git rev-parse --git-dir > /dev/null 2>&1; then echo "]"; fi)\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] '
# export PS1="\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]\u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)\n\[\033[0;32m\]└─\[\033[0m\]\[\033[0;32m\] \$\[\033[0m\]\[\033[0;32m\] ▶\[\033[0m\] "
#############################################################################
#https://gist.github.com/justintv/168835#gistcomment-2711710

21 changes: 21 additions & 0 deletions .inputrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# set TERM=xterm-256color
set colored-stats On
# Append char to indicate type
set visible-stats On
#set EDITOR=nvim
set completion-ignore-case on
set bell-style none
set editing-mode vi
set show-mode-in-prompt on
# $if term="linux"
# set vi-ins-mode-string \1\e[?0c\2
# set vi-cmd-mode-string \1\e[?8c\2
# $else
set vi-ins-mode-string "\1\e[6 q\2"
set vi-cmd-mode-string "\1\e[2 q\2"
#set vi-cmd-mode-string \1\e[0 q\2
# $endif

set keymap vi-insert
"jk": vi-movement-mode

13 changes: 6 additions & 7 deletions nvim/README.md → AppData/Local/nvim/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# My Dotfiles ![](https://img.shields.io/badge/config%20for-nvim-blue?style=for-the-badge)
# [![Nvim](https://img.shields.io/badge/config%20for-vim-blue?style=for-the-badge)](https://neovim.io/)

---

My setup for various applications.
## Neovim :rocket:

## nvim :rocket:

### COC : Conquer of Completion
### Plugins
#### 1. COC : Conquer of Completion

- `:CocCommand clangd.install ` (make sure clangd path is added to `:CocConfig`)
- `:CocInstall coc-clangd coc-css coc-emmet coc-eslint coc-html coc-java coc-jedi coc-json coc-lua coc-pairs coc-prettier coc-pyright coc-snippets coc-tsserver coc-vimlsp `
- quick tip :
you can move to floating window using `C-w` commands

### Firenvim
#### 2. Firenvim

#### Installation
##### Installation

- first follow installation instruction here : https://github.com/glacambre/firenvim
- to setup config jsons run
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if (has("termguicolors"))
set termguicolors
endif
set background=dark
set t_Co=256
" colorscheme gruvbox
" au Colorscheme gruvbox :hi Keyword gui=italic cterm=italic
"https://github.com/sainnhe/gruvbox-material/blob/master/doc/gruvbox-material.txt
Expand All @@ -18,8 +19,13 @@ let g:gruvbox_material_better_performance = 1
"configuration must be dont before applying colorscheme
"
"if &filetype!='gitcommit'
colorscheme gruvbox-material
let g:gruvbox_contrast_dark="hard"
let g:gruvbox_bold=1
let g:gruvbox_italic=1

colorscheme gruvbox
"endif

" }}}
"

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ set backspace=indent,eol,start
"send it to The blackhole-register
nnoremap x "_x

set autochdir
"set autochdir
" }}}


" EDITOR ----- {{{
syntax on
set conceallevel=0

" filetype on
" filetype plugin on
" filetype indent on
Expand All @@ -28,6 +30,8 @@ set softtabstop=4
set shiftwidth=4
set number relativenumber
set scrolloff=8
set showtabline=2
set lazyredraw
"set colorcolumn=80
" Show white spaces https://gist.github.com/jdavid82/d40f40e6f124aad6223eba0ff0c7ad65#file-vimrc-L37-L39
"set listchars=tab:>·,trail:~,extends:>,precedes:<,space:·
Expand All @@ -36,8 +40,8 @@ set scrolloff=8
"

" SEARCHING ----- {{{
set nohlsearch
set incsearch "on by default"
set nohlsearch
" clear last used search pattern:http://vimdoc.sourceforge.net/htmldoc/pattern.html#last-pattern
"
let @/=""
Expand Down
14 changes: 8 additions & 6 deletions nvim/general/git.vim → AppData/Local/nvim/general/git.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ endfunction
if &diff
set nornu
"https://stackoverflow.com/questions/2019281/load-different-colorscheme-when-using-vimdiff
" highlight! DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight! DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight! DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight! DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
highlight! DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight! DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight! DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight! DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
" Fix the difficult-to-read default setting for diff text highlighting. The
" bang (!) is required since we are overwriting the DiffText setting. The highlighting
" for \"Todo" also looks nice (yellow) if you don't like the \"MatchParen" colors.
highlight! link DiffText MatchParen

"no transperant bg : set to default colors from gruvbox"
"found out using :hi Normal
highlight! Normal ctermfg=223 ctermbg=235 guifg=#ebdbb2 guibg=#282828
:call Set_git_settings()
endif


augroup GITCOMMIT_SETTINGS
"https://vi.stackexchange.com/questions/4343/can-i-detect-whether-current-vim-instance-is-launched-by-git
autocmd!
autocmd FileType gitcommit silent :call Set_git_settings()
autocmd FileType gitcommit,gitrebase silent :call Set_git_settings()
augroup END
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inoremap jk <ESC>
" yanking ----- {{{
"to match the behaviour of 'C' and 'D'
nnoremap Y y$
"replace with yanked word
"https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text
nnoremap S "_diwP
vnoremap S "_d"0P
"highlight the yanked area for an extened period
augroup highlight_yank
autocmd!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nnoremap <leader>p :bprev<CR>
nnoremap <leader>b :buffers<CR>

" splits ----- {{{
nnoremap <leader>w <C-W>w
"nnoremap <leader>w <C-W>w "removed to support vimwiki
nnoremap <leader>h <C-W>h
nnoremap <leader>l <C-W>l
nnoremap <leader>j <C-W>j
Expand Down
26 changes: 26 additions & 0 deletions AppData/Local/nvim/helpers/commands.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function GET_DATE()
" let l:date = system('date | sed 1q')
" put =l:date
exe ":normal idate"
put =strftime(\"%b %d, %Y, %H:%M:%S\")
endfunction

command! InsertDate call GET_DATE()

function s:MD2PDF()
" use &filetype"
if expand("%:e")!="md"
return
endif
"silent! :call system("pandoc ")
execute "!pandoc \"".expand("%:p").
\"\" -o ".expand("%:r").".pdf"
echomsg "Pdf conversion successful!"
endfunction

augroup PANDOC
autocmd!
" command! Pandoc silent! :!pandoc % -o %:r.pdf
command! Pandoc :call <SID>MD2PDF()

augroup end
27 changes: 23 additions & 4 deletions nvim/init.vim → AppData/Local/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
"set path+=**

let mapleader = "\<Space>"

source $LOCALAPPDATA/nvim/general/augroups.vim

"====================================================="
" plugins ----- {{{
source $LOCALAPPDATA/nvim/plugs/plugins.vim

source $LOCALAPPDATA/nvim/general/colorscheme_settings.vim

source $LOCALAPPDATA/nvim/plugs/ale.vim
source $LOCALAPPDATA/nvim/plugs/coc.vim
source $LOCALAPPDATA/nvim/plugs/lightline_v1.vim
source $LOCALAPPDATA/nvim/plugs/telescope_plug.vim
source $LOCALAPPDATA/nvim/plugs/firenvim.vim
source $LOCALAPPDATA/nvim/plugs/fzf.vim
source $LOCALAPPDATA/nvim/plugs/goyo.vim
source $LOCALAPPDATA/nvim/plugs/lightline_v1.vim
source $LOCALAPPDATA/nvim/plugs/markdown.vim
source $LOCALAPPDATA/nvim/plugs/nerdtree.vim

source $LOCALAPPDATA/nvim/plugs/telescope_plug.vim
"
source $LOCALAPPDATA/nvim/plugs/ultisnips.vim
source $LOCALAPPDATA/nvim/plugs/vimwiki.vim
source $LOCALAPPDATA/nvim/plugs/vimstartify.vim
" }}}
"
"====================================================="
source $LOCALAPPDATA/nvim/general/cursor.vim
source $LOCALAPPDATA/nvim/general/general.vim
source $LOCALAPPDATA/nvim/general/leader.vim
Expand All @@ -18,7 +36,8 @@ source $LOCALAPPDATA/nvim/languages/languages.vim

source $LOCALAPPDATA/nvim/general/git.vim

"set path+=**
hi Normal ctermbg=none guibg=none
source $LOCALAPPDATA/nvim/helpers/commands.vim

"hi Normal ctermbg=NONE guibg=NONE
hi Comment gui=italic cterm=italic
hi htmlArg gui=italic cterm=italic
11 changes: 11 additions & 0 deletions AppData/Local/nvim/plugs/ale.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
" ALE ----- {{{
" ALE (Asynchronous Lint Engine)
" let g:ale_fixers = {
" \ 'javascript': ['eslint']
" \ }
" let g:ale_sign_error = '❌'
" let g:ale_sign_warning = '⚠️'
" let g:ale_fix_on_save = 1

" }}}

File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions AppData/Local/nvim/plugs/fzf.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
" fzf ----- {{{
" put search prompt at the top
let $FZF_DEFAULT_OPTS ='--reverse'
nnoremap <C-p> :Files<CR>
" let g:fzf_action = {
" \ 'ctrl-t': 'tab split',
" \ 'ctrl-s': 'split',
" \ 'ctrl-v': 'vsplit'
" \}
" }}}


27 changes: 27 additions & 0 deletions AppData/Local/nvim/plugs/goyo.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function! s:goyo_enter()
if executable('tmux') && strlen($TMUX)
silent !tmux set status off
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
endif
set noshowmode
set noshowcmd
set scrolloff=999
" Limelight
" ...
endfunction

function! s:goyo_leave()
if executable('tmux') && strlen($TMUX)
silent !tmux set status on
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
endif
set showmode
set showcmd
set scrolloff=5
" Limelight!
" ...
endfunction

autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()

28 changes: 28 additions & 0 deletions AppData/Local/nvim/plugs/lightline_v1.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
" lightline ----- {{{
" Dependencies:
" + Fugitive
" + Gruvbox Material
" Lightline
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],['readonly', 'modified','fugitive']],
\ 'right' : [['cocstatus', 'currentfunction'],['lineinfo'], ['percent'],['filetype','fileencoding']]
\ },
\ 'component_function': {
\ 'cocstatus': 'coc#status',
\ 'currentfunction': 'CocCurrentFunction',
\ 'fugitive':'FugitiveGetBranchName'
\ },
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
\ }

function! FugitiveGetBranchName()
" return fugitive#statusline()
let l:branchname = FugitiveHead()
return strlen(l:branchname)>0 ? "\uE0A0".FugitiveHead() : ''
endfunction
" }}}


Loading