This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! AlignWithTopLine() range | |
" Handle case when selection is at the start of the file | |
if a:firstline <= 1 | |
" If at the start of file, use default indentation (0) | |
let reference_indent = 0 | |
let above_line = "" | |
else | |
" Find the first non-empty line above the selection | |
let above_line_num = a:firstline - 1 | |
while above_line_num >= 1 && getline(above_line_num) =~ '^\s*$' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Never lose what you wrote! Allows one to fetch the recent things you either typed in insert mode or copied - (by buffers and time). | |
" Allows you to fetch the last 1000 inserts for any buffer using FZF (open buffers / current buffers ) | |
" Optimizations for speed and memory | |
"To use - fill: | |
" let g:vimloc =" location to save inserts.cache" | |
"requires fzf.vim | |
" to use call EnableTrackInserts on .vimrc | |
" Enable some of these mappings: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Depends on FZF | |
# Remove the default cd alias | |
Remove-Alias cd | |
# Create a new cd function | |
function MyCD { | |
Set-Location @args | |
$curtime =$(Get-Date -Format "yyyy-MM-dd HH:mm:ss") | |
$dict = @{ | |
Id = "30" |