Skip to content

Instantly share code, notes, and snippets.

@eduardoarandah
eduardoarandah / neovim-install.sh
Last active March 18, 2021 17:52
Neovim nightly Install script
# where's installed current version?
which nvim
# what's current version?
nvim -v
# make tmp folder
mkdir -p ~/tmp
cd ~/tmp
@eduardoarandah
eduardoarandah / script
Created January 7, 2021 19:40
Neovim build script
# Example build script
git clone https://github.com/neovim/neovim.git
cd neovim
make install
mv build/bin/nvim /usr/local/bin/nvim05
# put this in your .zshrc or .bashrc
alias v=/usr/local/bin/nvim05
alias nvim=/usr/local/bin/nvim05
@eduardoarandah
eduardoarandah / .vimrc
Created December 12, 2020 03:06
Vim plugin share code pastebin
"""""""""""""""""""""""""""""""""""
" Share via paste.rs
"
" Visual select and :Share
"
" Add .extension to url to format code
" Example: .markdown
"""""""""""""""""""""""""""""""""
function! s:share() range
@eduardoarandah
eduardoarandah / .zshrc
Last active December 5, 2020 01:01
Linux shortcuts, navigate to favorite directories with fuzzy search (requires fzf)
#####################
# Directory shortcuts
#####################
#
# Navigate to favorite directories with fuzzy search
# Requires fzf
#
# `sc` mark current dir
# `s` go to mark
# `scr` remove mark
@eduardoarandah
eduardoarandah / bootstrap4
Created October 7, 2020 22:12
Dictionary of all bootstrap 4 classes. You can use it with vim, coc, coc-dictionary
98px
accordion
active
alert
alert-danger
alert-dark
alert-dismissible
alert-heading
alert-info
alert-light
@eduardoarandah
eduardoarandah / instructions.md
Last active August 18, 2021 07:03
How to debug vim plugins or mappings

Create a file tmpvimrc with the following content

Add relevant plugins or mappings before or after plugins.

set nocompatible hidden laststatus=2

""""""""""""""""""""""""""""""""""
" PUT HERE YOUR MAPPINGS
""""""""""""""""""""""""""""""""""
@eduardoarandah
eduardoarandah / script.sh
Created August 12, 2020 17:59
Compile special nvim branch and add vim-apm extension
# build requisites
sudo apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip
# download
cd ~
git clone https://github.com/tjdevries/neovim.git -b tjdevries/keystrokes nvim2
cd nvim2
# Compile ( Install guide: https://github.com/neovim/neovim/wiki/Building-Neovim#building )
make CMAKE_BUILD_TYPE=Release
@eduardoarandah
eduardoarandah / .vimrc
Last active July 9, 2020 23:08
neovim easy buffer movement. FZF floating window and vim airline to see them
" This mapping combination with FZF feels great!
" See how this works: https://gfycat.com/wellgroomedofficialblueandgoldmackaw
" Buffers change with index and middle
nnoremap <C-j> :bn<CR>
nnoremap <C-k> :bp<CR>
" Index finger to filter lines in all buffers with jump to line
nnoremap <leader>j :Lines<CR>
@eduardoarandah
eduardoarandah / covid.js
Created July 7, 2020 16:35
Monitor de coronavirus que obtiene datos del sitio oficial de gobierno https://coronavirus.gob.mx/datos/
var fetch = require('node-fetch');
async function activos(claveMunicipio) {
let response = await fetch('https://coronavirus.gob.mx/datos/Overview/info/getInfo.php', {
headers: {
accept: '*/*',
'accept-language': 'es,es-ES;q=0.9,en;q=0.8',
'cache-control': 'no-cache',
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundaryWUKVwTBDWw1CIYBb',
pragma: 'no-cache',
@eduardoarandah
eduardoarandah / .bashrc
Last active July 7, 2020 15:53
jslive optionalfilename.js Javascript Live Editing environment with tmux and vim. Opens tmux with vim in the left, nodemon in the right
# jslive [yourfile.js]
# Test your javascript in a live reload environment
# Opens tmux with vim in the left, nodemon in the right
# Requires tmux and nodemon npm install -g nodemon
function jslive () {
# $# is args number
if [ $# -eq 0 ] && file=tmp.js || file=$1
# Create file
touch $file
# split with tmux, left is vim, right is node