Skip to content

Instantly share code, notes, and snippets.

View kshivang's full-sized avatar
🐨
>>> Faith in oneself not reality <<< 🐨

Shivang kshivang

🐨
>>> Faith in oneself not reality <<< 🐨
View GitHub Profile
@kshivang
kshivang / .vimrc
Last active January 19, 2024 05:02
My vimrc
let g:python_host_prog='/usr/bin/python'
call plug#begin('~/.nvim/plugged')
Plug 'ryanoasis/vim-devicons' " For auto iconify vim
"Plug 'hsanson/vim-android' " For android development
Plug 'scrooloose/nerdcommenter' " Comment fast and professionally
Plug 'scrooloose/nerdtree' , {'on': 'NERDTreeToggle'} " Proper file explorer inside vim
"Plug 'justinmk/vim-dirvish'
Plug 'flazz/vim-colorschemes' " All popular Colorscheme
Plug 'tpope/vim-surround' " Quick Surround with tags or Brackets
Plug 'octol/vim-cpp-enhanced-highlight' " Enhanced syntax highlight for CPP files
@kshivang
kshivang / BaseActivity.java
Last active October 11, 2020 16:16
Instagram like ViewPager implementation with bottom tab layout, without recreating fragments in fragment manager on tab select or back click. Implementation is prescribed for ViewPager inside fragment(more complex case) similar thing could be achieved for ViewPager in activity as well.
public abstract class BaseActivity extends AppCompatActivity {
public void moveBack() {
super.onBackPressed();
}
public abstract void onBackWhenNoFragment();
@Override
public void onBackPressed() {