Compare commits

...

96 Commits

Author SHA1 Message Date
d30553d2d2 Added words to custom dictionary 2025-06-09 14:35:48 -04:00
271aa3182b Removed autowrite section
I suspect it created a ton of sync-conflicts in my notes. Auto saving
isn't worth it if that's the result.
2025-05-28 12:31:33 -04:00
6a9ca5c23d Added vim-setcolor script
Must be sourced. Colorscheme browser. Use F8/Shift-F8 to browse
colorschemes.
2025-05-19 18:18:37 -04:00
0edac00442 Testing autowrite,autoread for md files
Will autosave Markdown files on exit. Should also read changes made
outside of Vim. Purpose: to minimize file conflicts in Syncthing.
2025-05-17 20:09:09 -04:00
cc9e42b469 Added more words to dictionary +abbreviations
Added some commonly misspelled words to my .vimrc abbreviations
2025-05-14 11:49:13 -04:00
1274eb0597 Removed filename from readinglist template 2025-05-12 21:50:47 -04:00
18ae6546e6 ExtractWikiLinks
Added a separate function to extract wiki links
It must be sourced on-demand, since it's not tested
2025-05-10 19:31:56 -04:00
7f94c04724 Removed extraneous comments, improved keybindings
Finally removed all the commented out lines that I was saving in case I
needed to roll them back. Switched some keybindings to keys that made
more sense.
2025-05-08 20:34:37 -04:00
9bc08347a8 Added vim-signify
and configured to show Git info in gutter. Updated config to show more
git info in statusline
2025-05-08 16:58:35 -04:00
b7ca4be5cf .vimrc with the custom colors mostly removed
relying on the colorscheme
2025-05-08 08:48:23 -04:00
fdc6ea1ef3 FZF wiki links
Added functions to use FZF to insert file links into current buffer.
- `<ctrl>-p` for wiki link
- `<ctrl>-l` for file name
2025-04-29 18:00:56 -04:00
08bf9e7354 Added if/then to ignore directive incompatible with nvim
Aiming to keep .vimrc compatible with nvim for testing.
2025-04-28 14:27:13 -04:00
81ac79f7b4 Fixed buffer navigation keybind.
<crtl>-<left> and <crtl>-<right> to navigate open buffers.
2025-04-28 09:45:08 -04:00
97bd1e0365 Added CHANGELOG.md
Created a function that will generate a CHANGELOG from my previous 25
commits, so I don't have to keep updating the README.md file
2025-04-24 19:34:29 -04:00
9dbe4a87c0 Disable folding for yaml
Disable fold for yaml files
2025-04-24 19:05:01 -04:00
b052f7fa32 Added line number toggle and colorscheme customization
- <leader>n to toggle line numbers
- source ~/.vimcustom (if exists) for custom colorscheme
- disable airline theme (let it inherit from colorscheme
-
2025-04-23 11:26:36 -04:00
fe39e86bb5 added words to dictionary 2025-04-20 12:57:00 -04:00
aaf5d31567 Reworked Spell Check Section
Removed the global nospell autocommands:
  The lines `autocmd BufRead,BufNewFile * setlocal nospell` and
  `autocmd BufRead,BufNewFile *.* setlocal nospell` have been removed.
  These were turning off spell checking for all files.
2025-04-15 13:05:56 -04:00
d2821c7df6 .vimrc changes
- Theme: darkburn
- ASCII foldchars
- Changed keybinding for notes to `<leader>nn`
-
2025-04-14 15:01:21 -04:00
750376d311 Added no line break to wrap toggle 2025-04-14 12:56:37 -04:00
chawley (tfadmin)
0793816ad0 Updated README 2025-04-14 15:33:40 +00:00
chawley (tfadmin)
063e68f7de Added marks list
Keybinding (`<leader>m`) to open mark list
2025-04-14 15:29:52 +00:00
c63cb6ae86 Added keybinding for datestamp
Added additional keybinding to mimic datestamp entry from VS Code (<crtl><shift>-i)
2025-04-14 09:49:54 -04:00
a2c808e92d Added words to custom dictionary 2025-04-14 09:48:32 -04:00
41a036f3ec Updated README 2025-04-14 09:17:33 -04:00
48dd07630c Upgraded vim-plug plugin
via :PlugUpgrade
2025-04-14 09:07:06 -04:00
b2bacfae4f .vimrc and rm old templates
Removed unused templates, added word-wrap to .vimrc
2025-04-14 09:01:36 -04:00
chawley (tfadmin)
6db5468bfe Updated vim-plug plugin 2024-10-28 16:16:28 +00:00
6372ff4c5d text width = 135
Increased text width to 135 by default.
2024-05-21 19:07:16 -04:00
89fdfb9fec Changed keybinding for FZF paste
Press <ctrl>-p to paste the filename of the file selected by FZF
2024-05-09 07:34:12 -04:00
f4f82ad175 .vimrc - removed reference to filenames in markdown frontmatter 2024-05-03 15:56:58 -04:00
97f7d506f8 Markdown Frontmatter
I removed the filename from markdown frontmatter. I've renamed file and
the filename in the frontmatter doesn't update. That's a recipe for
confusion later
2024-05-03 15:48:07 -04:00
244c5ed80c Added words to custom dictionary 2024-04-24 19:16:31 -04:00
67569b9a13 Added link to ref for 2024-04-23 19:40:25 -04:00
91e5cd5405 Leader-f to fuzzy search word under cursor
`<leader>-f` to open FZF window with word under cursor pre-populated
2024-04-23 19:20:05 -04:00
0fa0c06df9 Frontmatter for readinglist
Reverted readinglist frontmatter to standard format with yaml delimiters
and bracketed tags
2024-04-16 19:28:39 -04:00
d0cfda726a Frontmatter tag format
Frontmatter tags should be a list (in brackets). If I'm going to do
this, I may as well do it right.
2024-04-15 08:12:46 -04:00
5669fb21aa Re-added proper frontmatter to markdown template
I'd removed the hashmarks from the markdown frontmatte tempplate so I
could use tags in SilverBullet, but decided against using SilverBullet
regularly. Not enough to break proper formatting.
2024-04-15 07:56:03 -04:00
2784a69fe3 Removed timestamps from Markdown Files
I removed the time from markdown `fileupdated` datestamps. I don't need
that level of reference. The date a file was updated is fine.
2024-04-10 10:25:50 -04:00
20e6cb3e9b Color Changes
Updated column colum and visual select color
2024-04-04 19:57:24 -04:00
8b9ec43532 New Frontmatter
II reworked the frontmatter in the templates to be more accessible to
SilverBullet
2024-04-03 12:02:13 -04:00
501dab269b GFiles
Added a keybinding (<leader>f) to bring up the FZF results for Git files
2024-03-20 13:20:27 -04:00
chawley [chawley]
6aeec2bcb4 Better comments for FZF Actions
I'll never open files in tabs. Commented code to explain opeing FZF
result in split,vsplit or copying filename to buffer.
2024-03-19 11:50:04 -04:00
068e40a4cf ctrl-o to paste file from FZF buffer 2024-03-18 18:48:27 -04:00
b17087c810 colorscheme jelleybeans
Also removed a bunch of comments from changed I held onto until I was
sure they worked.
2024-03-14 07:59:08 -04:00
chawley [chawley]
65143d2276 vim-plug update
I've forgotten to do `PlugUpgrade` for too long.
2024-03-11 17:34:32 -04:00
0c62678a90 Vim Bullets
While troublshooting markdown bullets in Vim, I commented out a bunch
of extraneous options. I'll leave it like this for a bit before removing
anything permanently.
2024-03-11 17:29:36 -04:00
66ec1489f5 ReadingList template tweak
I added spaces and a title to the ReadingList template since I add those
for every book I use this template with.
2024-03-11 08:28:57 -04:00
529508f7db Frontmatter
I changed the markdown and readinglist templates to a "frontmatter"
format. Hoping to see if I can make my notes more easily processed by
using a pre-defined header.
2024-03-09 19:17:50 -05:00
46237ae49c vim-airline
Commented out my status line settings in favor of vim-airline
2024-03-07 13:30:25 -05:00
4a23a48109 Added words to custom dictionary 2024-03-07 11:20:14 -05:00
8b5d5e7fd5 Vim Bullets
More changes to `formatoptions` and installed vim-bullets to try to solve
my markdown bullet formatting issues.
2024-03-07 06:37:30 -05:00
2a420ecb04 Vim formatoptions
Messing with format options to make it easier for me to write markdown
bullet points in my notes.
2024-03-03 12:19:13 -05:00
e43aa0908e Added words to custom dictionary 2024-03-01 22:11:48 -05:00
f8872bea78 New keymaps for buffers/panes
I'm experimenting with using the arrow keys:

- <ctrl>-arrow left/right to switch buffers
- <alt>-arrow left/right/up/down to navigate panes

I left the old maps commented out in case this breaks something
2024-03-01 13:37:00 -05:00
9b4cce2f4f .vimrc <ctrl-r>
Removed keybinding shortcut for registers once I discovered it overrides
the keybinding for redo
2024-03-01 09:15:50 -05:00
5b5fc220d1 More .vimrc updates
- Re-arranged the status line
- changed colors of inactive pane to be more muted
- fixed header auto-populate on shell header
- enabled some setting for ft=yaml
2024-02-29 15:39:28 -05:00
754b89b71a uncommented line forgotten about after testing 2024-02-28 14:40:55 -05:00
36184cddd4 Cleaned up .vimrc
Re-arranged things to make it easier to see if I'm over-writing
keybindings.  Added comments to areas that didn't have any.  Reverted
some keybindings I found I wasn't using.

Also changed the Banner template to use double-quotes instead of
hash marks since I only ever use it in my .vimrc
2024-02-28 11:31:55 -05:00
de4af48ee6 Updated README
Mostly to specify that I'll be making better commits so I don't have to
double my efforts by publishing a changelog here after every commit.
2024-02-27 14:19:56 -05:00
f9039e7772 Fixed typo in markdown header update 2024-02-27 14:19:27 -05:00
chawley (tfadmin)
9f3a47b2e1 Shell header template
Automatically populate filename, creation date and modification date in
shell header.  Also add the ability to update header on old scripts
2024-02-27 18:54:25 +00:00
352d1f77c6 Added words to custom dictionary 2024-02-27 11:55:08 -05:00
ba1cd76362 Template changes
Since my markdown templates use `Title` and the keyword for the filename
and my ReadingList template also used `Title` as a keyword, my
automations were getting confused.

I changed `Title` in the markdown template to `filename` to solve.

Also, I reverted my `poor man's surround` keybindings for an actual
plugin: `tpope/vim-surround`
2024-02-27 11:51:57 -05:00
8298e74e22 Auto close and disable conceal
Added keybinding to approximate auto close of brackets and parentheses.
Disabled `conceal` so I can see full inks and code fences
2024-02-26 18:44:06 -05:00
376bfe60ee Added auto close & disabled conceal
Added some lines to approximate auto closing of brackets and parentheses
and turned off `conceal` allowing me to see full links and code fencing
2024-02-26 18:25:25 -05:00
d81ebbc07a Removed ALE plugin
Actually, I commented it out.  I don't think I'm using it and I don't
think I understand it.
2024-02-26 17:40:46 -05:00
729eabb51e Added words to custom dictionary 2024-02-26 15:58:00 -05:00
8617207a46 Buffer and Pane navigation
Changed keybindings so `<leader>` generally operates on panes and `<ctrl>` generally operates
on buffers.  Also adjusted some colors.
2024-02-26 15:56:08 -05:00
fc2e6f39d4 Added words to custom dictionary 2024-02-25 20:30:57 -05:00
36fc79597a Template Improvements
Added a Reading List header template and added some functionality to the
Markdown header making it easier to add headers to existing files
2024-02-25 20:28:56 -05:00
65236003c5 Added words to custom dictionary 2024-02-25 18:28:29 -05:00
945f805543 Markdown header snippet
I made a shortcut to include a Markdown header on an existing file
by `,md` in normal mode.  This will insert the `,md` template and update
the title with the filename (minus extension)
2024-02-25 18:26:08 -05:00
993d717dfa Updated README.md 2024-02-25 13:41:19 -05:00
42808dbf59 Updated README.md 2024-02-25 13:37:48 -05:00
fa67c5f5bf Added words to custom dictionary 2024-02-25 13:31:13 -05:00
bdf7cbd88c Integrated vim-spellsync
Magically rebuild Vim spell files if word lists are modified outside of
Vim. One use case would be if word lists are stored in a source control
system like Git and shared across multiple computers\. SpellSync also
creates `.gitignore` and `.gitattributes` files in Vim's spell directories
to exclude binary spell files and uses its union merge driver to avoid
conflicts.
[link]](https://github.com/micarmst/vim-spellsync)
2024-02-25 13:26:06 -05:00
d3407f9bab Added Markdown and shell scrip templates
and logic to update time stamps n those files for file creation and modification
2024-02-25 13:24:25 -05:00
faa5aed9ed Added words to custom dictionary 2024-02-24 11:16:45 -05:00
3822bfed91 keybinding updates
* `<leader><leader` to open `:Files`
* `<leader>q`       to quit
* `<leader><space>` to clear highlights
2024-02-23 16:45:38 -05:00
e64fc7a335 Added new words to custom dictionary 2024-02-23 16:45:00 -05:00
fab299fa13 .vimrc - set folds
Set folds open by default in markdown files
2024-02-23 13:42:27 -05:00
802effee7e Fixed path in .gitignore
To ignore `.vim/.netrwhist`
2024-02-23 10:59:05 -05:00
f7b1ea4b5b Vim Spellcheck
Modified `.gitignore` to source-control my custom dictionary in
`.vim/spell/*`
2024-02-23 10:08:51 -05:00
6f9fdab429 Added yaml to Markdown fenced languages 2024-02-22 16:51:20 -05:00
36bf857053 Replaced vimwiki
With:
* godlygeek/tabular
* preservim/vim-markdown

Inspired by [Writing Markdown in
Vim](https://codeinthehole.com/tips/writing-markdown-in-vim/), in an effort to get better Markdown productivity.
2024-02-22 14:35:39 -05:00
chawley (tfadmin)
eaa36969c3 Vimwiki autowrite all
Enabled Vimwiki to autowrite, so when I edit a wiki file and hit
backspace, it automatically saves the file
2024-02-20 21:16:58 +00:00
78cd1de02a Changed Vimwiki extension to .md
* [How to use vimwiki filetype only for vimwiki files (not all .md files)](https://github.com/vimwiki/vimwiki/issues/95)
* [vimwiki filetype stays "vimwiki" regardless of \.md ext](https://www.reddit.com/r/neovim/comments/zx6rud/vimwiki_filetype_stays_vimwiki_regardless_of_md/)
2024-02-19 15:04:10 -05:00
65a17e9d5e Added some editing keybindings
* Autocomplete filename
* goto file
2024-02-19 14:38:48 -05:00
bad34f2ce4 Vimwiki
Added the Vimwiki plugin and made configuration changes to use Markdown
format.
2024-02-19 14:30:36 -05:00
640034fb84 Changed Markdown template call from to 2024-02-18 15:42:29 -05:00
eb31c22500 Added script to manaully create symlinks 2024-02-18 15:24:54 -05:00
3a1a81a671 Added script to manaully create symlinks 2024-02-18 15:24:54 -05:00
de84627ad1 Update .vim/vim-keys-help.md
Fixed formatting (again)
2024-02-14 10:14:19 -05:00
b6028f8adb Update personal help file
Also added keybind (`<leader>h`) to open it automatically
2024-02-14 10:01:50 -05:00
25a08e9aa5 Update .vim/vim-keys-help.md
Updated markdown with bullets, so it displays nicely in Gitea/GitHub
2024-02-13 13:02:10 -05:00
20 changed files with 4214 additions and 466 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.vim/.netrwhist
.vim/plugged/*

2
.vim/.gitignore vendored
View File

@@ -1,2 +0,0 @@
spell/*
plugged/*

30
.vim/ExtractWikiLinks.vim Normal file
View File

@@ -0,0 +1,30 @@
function! ExtractWikiLinks()
let links = []
let pattern = '\v\[\[([^\]]+)\]\]'
let linenr = 1
while linenr <= line('$')
let line = getline(linenr)
let match = match(line, pattern)
while match != -1
let link_start = match + 2 " Start after '[['
let link_end = matchend(line, pattern) - 2 " End before ']]'
if link_end > link_start
let link = strpart(line, link_start, link_end - link_start)
call add(links, link)
endif
let match = match(line, pattern, matchend(line, pattern)) " Find next match
endwhile
let linenr = linenr + 1
endwhile
" Open a new buffer with the extracted links
new
" Make the buffer modifiable temporarily
set modifiable
call setline(1, links)
" Set the buffer options after writing
set nomodifiable buftype=nofile bufhidden=wipe nobuflisted noswapfile
echo "Extracted " . len(links) . " wiki links."
endfunction
command! ExtractLinks call ExtractWikiLinks()

File diff suppressed because it is too large Load Diff

2863
.vim/autoload/plug.vim.old Normal file

File diff suppressed because it is too large Load Diff

1
.vim/spell/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.add merge=union

2
.vim/spell/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.spl
*.sug

89
.vim/spell/en.utf-8.add Normal file
View File

@@ -0,0 +1,89 @@
Ansible
Applebee's
CentOS
Cinemark
Crissy
Cuyahoga
Debian
Dialogue
Facebook
HDFS
HQL
Hadoop
IRC
Kubernetes
MapReduce
ODBC
Offline
OverDrive
PHP
Pantek
Portainer
Royalton
SQL
Strongsville
Syncthing
TiddlyWiki
Trello
Ubuntu
blogspot
dotfiles
hemangioma
http
java
offline
online
sudo
UFW
VPS
Gitea
Nginx
FreshRSS
planethawleywood
Nextcloud
Obsidian
Grimoires
qTest
Tricentis
Chromebook
daylogs
Daylog
Atomoxetine
Methylphenidate
Strattera
Chipotle
cystoscopy
Aamon
Parma
Astaroth
Strongbad
CPAP
Chromebooks
Lomaira
Proxmox
MySQL
chawley
phansible
Abaddon
ChromeOS
TeachingBooks
NeuroSquad
Wormdingler
jinja
TODO
Neovim
Zettelkasten
Harpocrates
Weechat
Lorain
Meadowbrook
NotebookLLM
Satola
DeSha
Redis
hostname
Shawshank
Delly
tmux
freecycle
ReadEra

View File

@@ -1,3 +1,3 @@
# ---------------------------------------------------------------------------------------------------------------------
# ==>
#
" ---------------------------------------------------------------------------------------------------------------------
" ==>
"

View File

@@ -1,8 +0,0 @@
:insert
---
layout: post
title:
date:
categories:
---

View File

@@ -1,9 +0,0 @@
# title
Updated:
---
## Summary

8
.vim/templates/mdfm Normal file
View File

@@ -0,0 +1,8 @@
:insert
---
filecreated:
fileupdated:
filetags: [current]
---

16
.vim/templates/rlfm Normal file
View File

@@ -0,0 +1,16 @@
:insert
---
filecreated:
fileupdated:
filetags: [readinglist]
booktitle:
bookauthor:
bookstarted:
bookfinished:
---
# booktitle
## Highlights / Notes

View File

@@ -1,13 +1,14 @@
:insert
#!/usr/bin/env bash
#===============================================================================
#
# FILE:
# FILE: filename
# USAGE:
# DESCRIPTION:
# REQUIREMENTS:
# NOTES:
# AUTHOR: C Hawley
# CREATED:
# UPDATED:
#
#===============================================================================

View File

@@ -1,55 +0,0 @@
# vim-keys
A cheat sheet for my vim customizations
---
## Spelling
`<ctrl>-p` - auto-complete spelling suggestions
`<F10>` - toggle spellcheck
## Highlights
`<leader><leader>` - turn off search highlight
`<Leader>C` - toggle row/column cursor
## Buffers
`<ctrl>H` - to move to previous BUFFER
`<ctrl>L` - to move to next BUFFER
`<ctrl>J` - to move to lower PANE
`<ctrl>K` - to move to upper PANE
`<leader>s` - to save buffer
`<leader>c` - to close buffer
`<leader>a` - to abandon unsaved buffer
`<leader>x` - bring up the copy buffer
`<F5>` - refresh buffer
`<leader>r` - open registers
## FZF
`<leader>f` - open FZF files
`<leader>b` - open FZF buffers
## Text bubbling (http://vimcasts.org/episodes/bubbling-text/)
After text selection (`<ctrl-v>`)
`<ctrl>k` - bubble up
`<ctrl>j` - bubble down
## Date and Time stamps
`<F2>` - insert %Y-%m-%d %H:%M:%S
`<F3>` - insert %Y-%m-%d %a
`<F4>` - insert %H:%M
## Snippets
pre-made files inserted from `.vim/templates`
`,sh` - insert shell header
`,md` - insert markdown header
`,ban` - insert ASCII banner

120
.vim/vim-setcolors.vim Normal file
View File

@@ -0,0 +1,120 @@
" Change the color scheme from a list of color scheme names.
" Version 2010-09-12 from http://vim.wikia.com/wiki/VimTip341
" Press key:
" F8 next scheme
" Shift-F8 previous scheme
" Alt-F8 random scheme
" Set the list of color schemes used by the above (default is 'all'):
" :SetColors all (all $VIMRUNTIME/colors/*.vim)
" :SetColors my (names built into script)
" :SetColors blue slate ron (these schemes)
" :SetColors (display current scheme names)
" Set the current color scheme based on time of day:
" :SetColors now
if v:version < 700 || exists('loaded_setcolors') || &cp
finish
endif
let loaded_setcolors = 1
let s:mycolors = ['slate', 'torte', 'darkblue', 'delek', 'murphy', 'elflord', 'pablo', 'koehler'] " colorscheme names that we use to set color
" Set list of color scheme names that we will use, except
" argument 'now' actually changes the current color scheme.
function! s:SetColors(args)
if len(a:args) == 0
echo 'Current color scheme names:'
let i = 0
while i < len(s:mycolors)
echo ' '.join(map(s:mycolors[i : i+4], 'printf("%-14s", v:val)'))
let i += 5
endwhile
elseif a:args == 'all'
let paths = split(globpath(&runtimepath, 'colors/*.vim'), "\n")
let s:mycolors = uniq(sort(map(paths, 'fnamemodify(v:val, ":t:r")')))
echo 'List of colors set from all installed color schemes'
elseif a:args == 'my'
let c1 = 'default elflord peachpuff desert256 breeze morning'
let c2 = 'darkblue gothic aqua earth black_angus relaxedgreen'
let c3 = 'darkblack freya motus impact less chocolateliquor'
let s:mycolors = split(c1.' '.c2.' '.c3)
echo 'List of colors set from built-in names'
elseif a:args == 'now'
call s:HourColor()
else
let s:mycolors = split(a:args)
echo 'List of colors set from argument (space-separated names)'
endif
endfunction
command! -nargs=* SetColors call s:SetColors('<args>')
" Set next/previous/random (how = 1/-1/0) color from our list of colors.
" The 'random' index is actually set from the current time in seconds.
" Global (no 's:') so can easily call from command line.
function! NextColor(how)
call s:NextColor(a:how, 1)
endfunction
" Helper function for NextColor(), allows echoing of the color name to be
" disabled.
function! s:NextColor(how, echo_color)
if len(s:mycolors) == 0
call s:SetColors('all')
endif
if exists('g:colors_name')
let current = index(s:mycolors, g:colors_name)
else
let current = -1
endif
let missing = []
let how = a:how
for i in range(len(s:mycolors))
if how == 0
let current = localtime() % len(s:mycolors)
let how = 1 " in case random color does not exist
else
let current += how
if !(0 <= current && current < len(s:mycolors))
let current = (how>0 ? 0 : len(s:mycolors)-1)
endif
endif
try
execute 'colorscheme '.s:mycolors[current]
break
catch /E185:/
call add(missing, s:mycolors[current])
endtry
endfor
redraw
if len(missing) > 0
echo 'Error: colorscheme not found:' join(missing)
endif
if (a:echo_color)
echo g:colors_name
endif
endfunction
nnoremap <F8> :call NextColor(1)<CR>
nnoremap <S-F8> :call NextColor(-1)<CR>
nnoremap <A-F8> :call NextColor(0)<CR>
" Set color scheme according to current time of day.
function! s:HourColor()
let hr = str2nr(strftime('%H'))
if hr <= 3
let i = 0
elseif hr <= 7
let i = 1
elseif hr <= 14
let i = 2
elseif hr <= 18
let i = 3
else
let i = 4
endif
let nowcolors = 'elflord morning desert evening pablo'
execute 'colorscheme '.split(nowcolors)[i]
redraw
echo g:colors_name
endfunction

442
.vimrc
View File

@@ -1,24 +1,53 @@
" ---------------------------------------------------------------------------------------------------------------------
" ==> .vimrc
set nocompatible " be iMproved, required
set number " turn on line numbers
set relativenumber " lines are numbered relative to current line
set scrolloff=8 " number of lines to keep above and below the cursor
set belloff=all " no sound/flash on errors
" ---------------------------------------------------------------------------------------------------------------------
" ==> Some settings from Vim Zero: https://www.oliversherouse.com/posts/vim_zero.html
"
syntax enable
filetype plugin on
set autoread " set to auto read when a file is changed from the outside
set cursorcolumn " highlight current column
set cursorline " highlight current row
set incsearch " make search act like search in modern browsers
set showmatch " show matching brackets when text indicator is over them
" General
let mapleader = '\'
set autoread " set to auto read when a file is changed from the outside
set belloff=all " no sound/flash on errors
set cursorcolumn " highlight current column
set cursorline " highlight current row
set formatoptions-=rot " Turn off autoinsert of comment char on newline
set hidden " Allow background buffers without saving
set nolist " do not show invisible characters
set nocompatible " be iMproved, required
set number " turn on line numbers
set path+=** " Search Globally
set relativenumber " lines are numbered relative to current line
set ruler " show cursor poition
set scrolloff=10 " number of lines to keep above and below the cursor
set showmatch " show matching brackets when text indicator is over them
set splitright " Split to right by default
if !has('nvim')
set term=xterm-256color " LOTS of colors
endif
set wildmenu " enhanced command line completion
set fillchars=vert:\|,fold:.,diff:-
set term=xterm-256color " LOTS of colors
set path+=** " Search Globally
set wildmenu
" Text Wrapping
set colorcolumn= " disable colorzing <textwidth> column
set nowrap " turn off word wrapping at <textwidth>
" Search and Substitute
set gdefault " use global flag by default in s: commands
set hlsearch " highlight searches
set ignorecase " ignore case in searches
set incsearch " make search act like search in modern browsers
set smartcase " don't ignore capitals in searches
" Tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
autocmd! bufwritepost .vimrc source ~/.vimrc " When vimrc is edited, reload it
" Turn line numbers on/off for active/inactive buffers
augroup BgHighlight
autocmd!
@@ -28,37 +57,24 @@ augroup BgHighlight
autocmd WinLeave * set norelativenumber
augroup end
syntax enable
filetype plugin on
" Toggle invisible characters with <F5>
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
noremap <F5> :set list!<CR>
inoremap <F5> <C-o>:set list!<CR>
cnoremap <F5> <C-c>:set list!<CR>
" Native Markdown syntax highlighting for specified languages
let g:markdown_fenced_languages = ['html', 'python', 'sh', 'vim']
" Enable Omnicomplete features
set omnifunc=syntaxcomplete#Complete
" ---------------------------------------------------------------------------------------------------------------------
" ==> From Vim Zero: https://www.oliversherouse.com/2017/08/21/vim_zero.html
" Personal Notes settings
" export NOTES_DIR=<your notes directory> before use
" Go to index of notes and set working directory
nnoremap <leader>nn :e $NOTES_DIR/index.md<CR>:cd $NOTES_DIR<CR>
" General
let mapleader = '\'
set hidden " Allow background buffers without saving
set splitright " Split to right by default
set formatoptions-=ro " Turn off autoinsert of comment char on newline
" Text Wrapping
set textwidth=120 " Set textwidth
set colorcolumn= " disable colorzing <textwidth> column
set nowrap " turn off word wrapping at <textwidth>
" Search and Substitute
set gdefault " use global flag by default in s: commands
set hlsearch " highlight searches
set ignorecase " ignore case in searches
set smartcase " don't ignore capitals in searches
" Tabs
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
" <leader>[ to grep inside Notes files
" I got the idea from here [step 6: search contents of your notes](https://www.edwinwenink.xyz/posts/42-vim_notetaking/#step-6-search-contents-of-your-notes)
command! -nargs=1 Ngrep vimgrep "<args>" $NOTES_DIR/**/*.md | copen
nnoremap <leader>[ :Ngrep
" ---------------------------------------------------------------------------------------------------------------------
" ==> Plugins with VimPlug
@@ -86,112 +102,206 @@ Plug 'junegunn/fzf.vim'
" Fugitive is the premier Vim plugin for Git. Or maybe it's the premier Git plugin for Vim? Either way,
" it's so awesome, it should be illegal. That's why it's called Fugitive
" https://github.com/tpope/vim-fugitivefugitive.vim for git
" https://github.com/tpope/vim-fugitive
Plug 'tpope/vim-fugitive'
" ALE displays warnings and errors in files being edited before being saved back to the filesystem
" https://github.com/dense-analysis/ale
Plug 'dense-analysis/ale'
" Vim surround
" I tried to do this from scratch, but it seems this is the best alternative
" https://github.com/tpope/vim-surround
Plug 'tpope/vim-surround'
" Vim Markdown
" Suggestions from [Writing Markdown in Vim](https://codeinthehole.com/tips/writing-markdown-in-vim/)
" [Vim Markdown](https://github.com/preservim/vim-markdown)
Plug 'godlygeek/tabular'
Plug 'preservim/vim-markdown'
" Vim Spellsync
" Magically rebuild Vim spell files if word lists are modified outside of Vim
" https://github.com/micarmst/vim-spellsync
Plug 'micarmst/vim-spellsync'
" Vim Bullets
" I tried for too long to get Martkdown bullet to work right.
" https://github.com/bullets-vim/bullets.vim
Plug 'bullets-vim/bullets.vim'
" Vim Airline
" Lean & mean status/tabline for vim that's light as air.
" https://github.com/vim-airline/vim-airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" vim-signify
" https://github.com/mhinz/vim-signify
Plug 'mhinz/vim-signify'
call plug#end()
" ---------------------------------------------------------------------------------------------------------------------
" ==> Colors
" Term GUI Colors
" Testing different colorschemes
" Only the last uncommented colorscheme will be used
"colorscheme slate
"colorscheme marklar
"colorscheme automation
colorscheme advantage
" ==> Plugin Options
" Options and overrides for installed plugins
"highlight colorcolumn ctermbg=darkyellow guibg=darkyellow
"highlight VertSplit ctermbg=black guibg=black ctermfg=darkgray guifg=darkgray
highlight cursorcolumn cterm=NONE ctermbg=black ctermfg=white guibg=darkred guifg=white
"highlight visual cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
" Vim Markdown
" In split windows - active buffer status bar is yellow, inactive is black
"hi statuslinenc ctermbg=gray ctermfg=black
"hi statusline ctermbg=yellow ctermfg=green
" Markdown syntax highlighting for specified languages
let g:markdown_fenced_languages = ['html', 'python', 'ini', 'vim', 'bash', 'yaml']
" Set default conceallevel to hide links and some formatting
set conceallevel=0
" strikethrough
let g:vim_markdown_strikethrough = 1
" follow anchors - allow <ge> to follow anchors just like links
let g:vim_markdown_follow_anchor = 1
" turn off auto-bullets and indent so `gq` works correctly
let g:vim_markdown_auto_insert_bullets=0
let g:vim_markdown_new_list_item_indent=0
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_folding_disabled = 1
" Open folds by default
au BufWinEnter * normal zR
" bullets-vim
let g:bullets_enabled_file_types = [ 'markdown', 'gitcommit' ]
let g:bullets_outline_levels = ['num', 'abc', 'std*', 'std+', 'std-']
"vim-airline
let g:airline_extensions = ['hunks', 'branch', 'tabline']
let g:airline_detect_theme_from_guicolors = 1
let g:airline_powerline_fonts = 1
" ---------------------------------------------------------------------------------------------------------------------
" => Statusline
" Ideas from http://got-ravings.blogspot.com/2008/08/vim-pr0n-making-statuslines-that-own.html
" ==> FZF Helper Functions
"
" Configure FZF default key bindings (actions) within the FZF window
" 'ctrl-x': Open in horizontal split
" 'ctrl-v': Open in vertical split
" 'ctrl-t': Open in new tab (optional, common)
" 'ctrl-p': Paste raw filename(s) at cursor
" 'ctrl-l': Paste formatted [[wiki link]] at cursor
" NOTE: Define these functions BEFORE they are used in g:fzf_action below.
set laststatus=2 " always show statusline
set statusline= " clear on reload
set statusline+=[\ b%n\ ] " buffer number
set statusline+=\ %f " filename
set statusline+=\ [%{strlen(&fenc)?&fenc:'none'}, " file encoding
set statusline+=\ %{&ff}] " file format
set statusline+=\ %y " filetype
set statusline+=\ %H\ %m\ %r\ %W " flags
set statusline+=%= " left/right separator
set statusline+=l:%l/%L " cursor line/total lines
set statusline+=\ c:%c " cursor column
set statusline+=\ %P " percent through file
" Function to paste FZF selection(s) at the current cursor position
function! PasteFzfSelection(lines)
if type(a:lines) != type([]) || empty(a:lines)
echoerr "FZF Paste Error: No selection passed to function PasteFzfSelection."
return
endif
" Join multiple selections with a space
let text_to_paste = join(a:lines, ' ')
" Insert the text
call feedkeys('i' . text_to_paste . "\<esc>", 'ni')
endfunction
" Function to paste FZF selection as a formatted wiki link
function! PasteFzfWikiLink(lines)
if type(a:lines) != type([]) || empty(a:lines)
echoerr "FZF Paste Error: No selection passed to function PasteFzfWikiLink."
return
endif
" Typically you only link one file at a time
let filename = a:lines[0]
" --- CHOOSE YOUR LINK FORMAT ---
" Option 1: Wiki format [[filename_without_extension]]
"let filename_base = fnamemodify(filename, ':r') " Removes the extension
"let link_text = '[[' . filename_base . ']]'
" Option 2: Wiki format [[filename_with_extension]]
let link_text = '[[' . filename . ']]'
" Option 3: Markdown format [filename](filename)
" let link_text = '[' . filename . '](' . filename . ')'
" --- End Formatting Options ---
" Insert the formatted link
call feedkeys('i' . link_text . "\<esc>", 'ni')
endfunction
let g:fzf_action = {
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit',
\ 'ctrl-t': 'tab split',
\ 'ctrl-p': function('PasteFzfSelection'),
\ 'ctrl-l': function('PasteFzfWikiLink')
\ }
" ---------------------------------------------------------------------------------------------------------------------
" => Keymaps: Highlights
" <leader><leader> to turn off search highlight
nnoremap <leader><leader> :nohls <enter>
" <F6> to toggle search highlight
nnoremap <F6> :nohls <enter>
" <leader>C to toggle row/column highlight
nnoremap <Leader>C :set cursorline! cursorcolumn!<CR>
" <F7> to toggle row/column highlight
nnoremap <F7> :set cursorline! cursorcolumn!<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Buffers & Panes
" <ctrl>H to move to previous BUFFER
nnoremap <C-H> :bp <enter>
" <ctrl>-arrow left/right to navigate BUFFERS
map <esc>[1;5D :bp <enter>
map <esc>[1;5C :bn <enter>
" <ctrl>L to move to next BUFFER
nnoremap <C-L> :bn <enter>
" <ctrl>J to move to lower PANE
nnoremap <C-J> <C-W><C-J>
" <ctrl>K to move to upper PANE
nnoremap <C-K> <C-W><C-K>
" <leader> b to open FZF buffers
" <leader>b to open FZF buffers
map <leader>b :Buffers<CR>
" <leader>s to save buffer
nnoremap <Leader>s :w <enter>
" <leader>c to close buffer
nnoremap <Leader>c :bd <enter>
" <leader>m to open file marks
map <leader>m :Marks<CR>
" <leader>a to abandon buffer
nnoremap <Leader>a :bd! <enter>
nnoremap <leader>a :bd! <enter>
" <leader>x to bring up the copy buffer
noremap <Leader>x "+
" <leader>c to close buffer
nnoremap <leader>c :bd <enter>
" <F5> to refresh buffer
nnoremap <F5> <C-R>:checktime <CR>
" <c-s> to save buffer
nnoremap <c-s> :w<CR>
" <alt>-arrow keys to navigate panes
" UP
map <esc>[1;3A <c-w><c-k>
" DOWN
map <esc>[1;3B <c-w><c-j>
" LEFT
map <esc>[1;3D <c-w><c-h>
" RIGHT
map <esc>[1;3C <c-w><c-l>
" CLOSE
map <esc>x <c-w>q
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps
" <leader> f to open FZF files
map <Leader>f :Files<CR>
" <leader><leader> to open FZF files
map <leader><leader> :Files<CR>
" <leader>r to open registers
map <leader>r :registers<CR>
" <leader>g to open FZF Git files
map <leader>g :GFiles<CR>
" Map <leader>f to open FZF with word under cursor pre-populated
" https://github.com/junegunn/fzf.vim/issues/1235#issuecomment-773726008
nnoremap <leader>f :call fzf#run(fzf#vim#with_preview(fzf#wrap({'source': 'find . \( -name .git -o -name .stversions \) -prune -o -print -iname "*'.expand("<cword>").'*"', 'sink': 'e', 'options': '--query="'.expand("<cword>").'"'})))<CR>
" Toggles line wrapping with linebreak enabled when wrapping is turned on with <leader>w
nnoremap <leader>w :execute "if &wrap\n set nowrap\nelse\n set wrap linebreak\nendif"<CR>
" Toggle line numbers
nnoremap <leader>n :set number! relativenumber! <CR>
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Text bubbling (http://vimcasts.org/episodes/bubbling-text/)
" Bubble single lines
nmap <C-k> ddkP
nmap <C-j> ddp
nmap <c-k> ddkP
nmap <c-j> ddp
" Bubble multiple lines
vmap <C-k> xkP`[V`]
vmap <C-j> xp`[V`]
vmap <c-k> xkP`[V`]
vmap <c-j> xp`[V`]
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Movement keys
@@ -203,47 +313,76 @@ nnoremap k gk
" ---------------------------------------------------------------------------------------------------------------------
" ==> Keymaps: Date and Time stamps
" Send date and time
imap <F2> <C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>
" Send date and DOW
imap <F3> <C-R>=strftime("%Y-%m-%d %a")<CR>
imap <F4> <C-R>=strftime("%H:%M")<CR>
" alternate keybinding I use in VS Code
imap <C-S-i> <C-R>=strftime("%Y-%m-%d %a")<CR>
" Sends date
imap <F4> <C-R>=strftime("%Y-%m-%d")<CR>
" ---------------------------------------------------------------------------------------------------------------------
" ---------------------------------------------------------------------------------------------------------------------
" ==> Spellcheck
" ==> Spellcheck
" Toggle spell check highlights with <F10>
nnoremap <F10> :setlocal spell! spelllang=en_us<CR>
" auto-complete spelling suggestions with <ctrl-p>
" auto-complete spelling suggestions with <ctrl-p>
set complete+=kspell
autocmd FileType markdown setlocal complete+=kspell
autocmd FileType text setlocal complete+=kspell
autocmd FileType gitcommit setlocal complete+=kspell
" Toggle spell check highlights with <F10>
nnoremap <F10> :setlocal spell! spelllang=en_us<CR>
" ==> Spellcheck: only certain file types
" https://robots.thoughtbot.com/vim-spell-checking
" https://robots.thoughtbot.com/vim-spell-checking
" turn off for files with no extension
autocmd BufRead,BufNewFile * setlocal nospell
" turn off for files with any extension
autocmd BufRead,BufNewFile *.* setlocal nospell
" turn on for markdown files
" turn on for markdown files
autocmd BufRead,BufNewFile *.md setlocal spell
" turn on for text files
" turn on for text files
autocmd BufRead,BufNewFile *.txt setlocal spell
" turn on for git commits
autocmd FileType gitcommit setlocal spell spelllang=en_us
" ==> Spellcheck Colors
" I hate spellcheck's default colors
" (http://stackoverflow.com/questions/6008921/how-do-i-change-the-highlight-style-in-vim-spellcheck)
" Vim Colors: (http://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax)
"
" I hate spellcheck's default colors
" (http://stackoverflow.com/questions/6008921/how-do-i-change-the-highlight-style-in-vim-spellcheck)
" Vim Colors: (http://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax)
hi clear SpellBad
hi clear SpellCap
hi clear SpellErrors
hi clear SpellLocal
hi clear SpellRare
hi SpellBad cterm=underline ctermbg=black ctermfg=red
hi SpellCap cterm=underline ctermbg=black ctermfg=red
hi SpellCap cterm=underline ctermbg=none
hi SpellBad cterm=underline ctermbg=none
hi SpellLocal cterm=underline ctermbg=none
hi SpellRare cterm=underline ctermbg=none
" ---------------------------------------------------------------------------------------------------------------------
" ==> Templates: markdown documents with frontmatter (.md)
autocmd BufNewFile *.md so $HOME/.vim/templates/mdfm
autocmd BufNewFile *.md exe "g/^filecreated:.*/s//filecreated: " .strftime("%Y-%m-%d")
autocmd BufNewFile *.md exe "normal Go"
autocmd BufWritePre,filewritepre *.md execute "normal! ma"
autocmd BufWritePre,filewritepre *.md exe "g/^fileupdated:.*/s//fileupdated: " .strftime("%Y-%m-%d")
autocmd BufWritePost,filewritepost *.md execute "normal! `a"
" ---------------------------------------------------------------------------------------------------------------------
" ==> Templates: shell scripts (.sh)
autocmd BufNewFile *.sh so $HOME/.vim/templates/sh
autocmd BufNewFile *.sh :%s/filename/\=expand('%:t:r')/g
autocmd BufNewFile *.sh exe "g/CREATED:.*/s//CREATED: " .strftime("%Y-%m-%d")
autocmd BufNewFile *.sh exe "normal Go"
autocmd BufWritePre,filewritepre *.sh execute "normal ma"
autocmd BufWritePre,filewritepre *.sh exe "g/UPDATED:.*/s//UPDATED: " .strftime("%Y-%m-%d")
autocmd bufWritePost,filewritepost *.sh execute "normal `a"
" ---------------------------------------------------------------------------------------------------------------------
" ==> Snippets
" Pasting pre-made things
@@ -255,10 +394,13 @@ nnoremap ,ban :-1read $HOME/.vim/templates/banner<CR>jA
nnoremap ,begend :-1read $HOME/.vim/templates/begend<CR>jA
" section shell script header
nnoremap ,shead :-1read $HOME/.vim/templates/sh<CR>jA
nnoremap ,sh :0read $HOME/.vim/templates/sh<CR> <bar> :1<CR>dd <bar> :4%s/filename/\=expand('%:t')/g<CR>
" section readinglist header
nnoremap ,rl :0read $HOME/.vim/templates/rlfm<CR> <bar>zR<CR> <bar> :1<CR>dd
" section markdown file header
nnoremap ,md :-1read $HOME/.vim/templates/md<CR>jA
nnoremap ,md :0read $HOME/.vim/templates/mdfm<CR> <bar>zR<CR> <bar> :1<CR>dd
" ---------------------------------------------------------------------------------------------------------------------
" ==> NetrwTreeListing readonly fix (https://vi.stackexchange.com/a/13012)
@@ -270,5 +412,35 @@ autocmd FileType netrw setl bufhidden=delete
" ---------------------------------------------------------------------------------------------------------------------
" ==> yaml stuff (https://lornajane.net/posts/2018/vim-settings-for-working-with-yaml)
"
autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml
autocmd BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=manual
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" Abbreviations
" Correcting common misspellings
iab couljd could
iab wouljd would
iab monring morning
iab teh the
iab adn and
iab form from
iab wiht with
iab becuase because
iab definately definitely
iab seperate separate
" ---------------------------------------------------------------------------------------------------------------------
" ==> Colors
" Term GUI Colors
" colorscheme replaced by ~/.vimcustom
" If there is a file at ~/.vimcustom, the colorscheme defined in that file
" will be applied. If not, colorscheme defaults to 'darkburn'
" ---------------------------------------------------------------------------------------------------------------------
" ==> Source Local Customizations and Set Colorscheme
let s:custom_config_path = expand('$HOME/.vimcustom')
if filereadable(s:custom_config_path)
execute 'source' fnameescape(s:custom_config_path)
else
colorscheme darkburn
endif

133
CHANGELOG.md Normal file
View File

@@ -0,0 +1,133 @@
# Last 25 Commits
## 9dbe4a8 (chawley (penguin), 2025-04-24) - Disable folding for yaml
Disable fold for yaml files
## b052f7f (chawley (overlook), 2025-04-23) - Added line number toggle and colorscheme customization
- <leader>n to toggle line numbers
- source ~/.vimcustom (if exists) for custom colorscheme
- disable airline theme (let it inherit from colorscheme
-
## fe39e86 (chawley (penguin), 2025-04-20) - added words to dictionary
## aaf5d31 (chawley (overlook), 2025-04-15) - Reworked Spell Check Section
Removed the global nospell autocommands:
The lines `autocmd BufRead,BufNewFile * setlocal nospell` and
`autocmd BufRead,BufNewFile *.* setlocal nospell` have been removed.
These were turning off spell checking for all files.
## d2821c7 (chawley (overlook), 2025-04-14) - .vimrc changes
- Theme: darkburn
- ASCII foldchars
- Changed keybinding for notes to `<leader>nn`
-
## 750376d (phansible, 2025-04-14) - Added no line break to wrap toggle
## 0793816 (chawley (tfadmin), 2025-04-14) - Updated README
## 063e68f (chawley (tfadmin), 2025-04-14) - Added marks list
Keybinding (`<leader>m`) to open mark list
## c63cb6a (chawley (overlook), 2025-04-14) - Added keybinding for datestamp
Added additional keybinding to mimic datestamp entry from VS Code (<crtl><shift>-i)
## a2c808e (chawley (overlook), 2025-04-14) - Added words to custom dictionary
## 41a036f (chawley (overlook), 2025-04-14) - Updated README
## 48dd076 (chawley (overlook), 2025-04-14) - Upgraded vim-plug plugin
via :PlugUpgrade
## b2bacfa (chawley (overlook), 2025-04-14) - .vimrc and rm old templates
Removed unused templates, added word-wrap to .vimrc
## 6db5468 (chawley (tfadmin), 2024-10-28) - Updated vim-plug plugin
## 6372ff4 (chawley, 2024-05-21) - text width = 135
Increased text width to 135 by default.
## 89fdfb9 (chawley, 2024-05-09) - Changed keybinding for FZF paste
Press <ctrl>-p to paste the filename of the file selected by FZF
## f4f82ad (chawley, 2024-05-03) - .vimrc - removed reference to filenames in markdown frontmatter
## 97f7d50 (chawley, 2024-05-03) - Markdown Frontmatter
I removed the filename from markdown frontmatter. I've renamed file and
the filename in the frontmatter doesn't update. That's a recipe for
confusion later
## 244c5ed (chawley, 2024-04-24) - Added words to custom dictionary
## 67569b9 (chawley, 2024-04-23) - Added link to ref for
## 91e5cd5 (chawley, 2024-04-23) - Leader-f to fuzzy search word under cursor
`<leader>-f` to open FZF window with word under cursor pre-populated
## 0fa0c06 (chawley, 2024-04-16) - Frontmatter for readinglist
Reverted readinglist frontmatter to standard format with yaml delimiters
and bracketed tags
## d0cfda7 (chawley, 2024-04-15) - Frontmatter tag format
Frontmatter tags should be a list (in brackets). If I'm going to do
this, I may as well do it right.
## 5669fb2 (chawley, 2024-04-15) - Re-added proper frontmatter to markdown template
I'd removed the hashmarks from the markdown frontmatte tempplate so I
could use tags in SilverBullet, but decided against using SilverBullet
regularly. Not enough to break proper formatting.
## 2784a69 (chawley, 2024-04-10) - Removed timestamps from Markdown Files
I removed the time from markdown `fileupdated` datestamps. I don't need
that level of reference. The date a file was updated is fine.

View File

@@ -1,34 +1,23 @@
---
filecreated:
fileupdated: 2025-04-24
filetags: [readme]
---
# dotfiles-vim
I want to finally have a `.vimrc` in which I understand each and every line. After years of collecting snips and
scraps from other people's dotfiles, I want to make sure that I am aware of what my `.vimrc` is doing.
I want to finally have a `.vimrc` in which I understand each and every line. After years of collecting snips and scraps from other people's dotfiles, I want to make sure that I am aware of what my `.vimrc` is doing.
This configuration is based heavily on the guide I found here: [Vim Zero](https://www.oliversherouse.com/posts/vim_zero.html)
which does exactly what I am aiming to do here: wipe the slate clean and start over.
This configuration is based heavily on the guide I found here: [Vim Zero](https://www.oliversherouse.com/posts/vim_zero.html) which does exactly what I am aiming to do here: wipe the slate clean and start over.
Whenever possible, I've noted the URL from which I found the setting or snippet. I try to insist that not everything is self-explanatory.
## Installation
Without the Ansible playbook, just clone this repo to a directory and create a few symlinks:
```sh
ln -s dotfiles-vim/.vimrc $HOME/.vimrc
ln -s dotfiles-vim/.vim $HOME/.vim
```
Clone this repo to a directory and run the `create-links.sh` script. CAUTION: this will remove any existing `.vimrc` and `.vim` directories and replace them with soft links to the files in this repository.
Then open vim and install (or update) the plugins with `:PlugInstall` (or `:PlugUpdate`)
---
* 2024-02-13: Several changes:
* Included more comments and links about what each entry does
* Removed polyglot plugin
* Removed ALE plugin
* Removed vim-markdown plugin
* Removed netrw customizations
* Removed auto templates, changed them to snippets:
* Insert markdown header with `,md`
* Insert shell header with `,sh`
## Changelog
Moved to CHANGELOG.md

23
create-links.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#===============================================================================
#
# FILE: create-symlinks.sh
# USAGE:
# DESCRIPTION:
# REQUIREMENTS:
# NOTES:
# AUTHOR: C Hawley
# CREATED:
#
#===============================================================================
# If regular files exists, remove them
[[ -f $HOME/.vimrc ]] && rm $HOME/.vimrc
[[ -d $HOME/.vim ]] && rm $HOME/.vim
# If symlinks exist, unlink them
[[ -L $HOME/.vimrc ]] && unlink $HOME/.vimrc
[[ -L $HOME/.vim ]] && unlink $HOME/.vim
ln -s $PWD/.vimrc $HOME/.vimrc
ln -s $PWD/.vim $HOME/.vim