From d1f3961632d3d9a1491ec15e323cedfd2c5cff37 Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Mon, 30 Dec 2024 17:40:32 -0500 Subject: [PATCH] Introducing (n)vim files --- .emacs | 59 +++++++++++++++++++++++++++++---------- .emacs-bookmarks | 20 +++++++++++++ .gitignore | 2 ++ .scripts/install-emacs.el | 6 ++-- .scripts/install-vim.sh | 13 +++++++++ .vimrc | 24 ++++++++++++++++ 6 files changed, 108 insertions(+), 16 deletions(-) create mode 100644 .emacs-bookmarks create mode 100644 .scripts/install-vim.sh create mode 100644 .vimrc diff --git a/.emacs b/.emacs index cf29e33..e21919b 100644 --- a/.emacs +++ b/.emacs @@ -22,9 +22,10 @@ (setq inhibit-startup-screen t) ;; Revert buffers when the underlying file has changed (global-auto-revert-mode 1) -;; turns off the menus at top +;; turns off bells and whistles (menu-bar-mode -1) (tool-bar-mode -1) +(scroll-bar-mode -1) ;; no bell sounds (setq ring-bell-function 'ignore) ;; no blinking cursor @@ -39,6 +40,9 @@ (setq-default indent-tabs-mode nil) (setq-default tab-width 4) +;; BOOKMARKS +(setq bookmark-default-file "~/.emacs-bookmarks") + ;; MARKDOWN MODE (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) @@ -56,17 +60,8 @@ ;; MARGINS (setq-default left-margin-width 2) (setq-default right-margin-width 2) -;; set window margins -;; (a bit buggy on multiple-window startup, but resolves) -;;(add-hook 'window-configuration-change-hook -;; (lambda () -;; (set-window-margins (car -;; (get-buffer-window-list -;; (current-buffer) nil t)) 2 2))) - ;; SPELLING - (add-hook 'text-mode-hook 'flyspell-mode) (add-hook 'prog-mode-hook 'flyspell-prog-mode) ;; Turn on Flyspell @@ -160,7 +155,43 @@ ) ) -;; File bookmarks -(defun proximate () - (interactive) - (find-file "~/Cloud/Notes/Proximate.md")) +;; RANDOM AUTO STUFF +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ansi-color-faces-vector + [default default default italic underline success warning error]) + '(ansi-color-names-vector + ["#d2ceda" "#f2241f" "#67b11d" "#b1951d" "#3a81c3" "#a31db1" "#21b8c7" "#655370"]) + '(custom-safe-themes + '("7fd8b914e340283c189980cd1883dbdef67080ad1a3a9cc3df864ca53bdc89cf" "bbb13492a15c3258f29c21d251da1e62f1abb8bbd492386a673dcfab474186af" default)) + '(hl-todo-keyword-faces + '(("TODO" . "#dc752f") + ("NEXT" . "#dc752f") + ("THEM" . "#2d9574") + ("PROG" . "#3a81c3") + ("OKAY" . "#3a81c3") + ("DONT" . "#f2241f") + ("FAIL" . "#f2241f") + ("DONE" . "#42ae2c") + ("NOTE" . "#b1951d") + ("KLUDGE" . "#b1951d") + ("HACK" . "#b1951d") + ("TEMP" . "#b1951d") + ("FIXME" . "#dc752f") + ("XXX+" . "#dc752f") + ("\\?\\?\\?+" . "#dc752f"))) + '(ispell-dictionary nil) + '(org-fontify-done-headline nil) + '(org-fontify-todo-headline nil) + '(package-selected-packages + '(magit wc-mode spacemacs-theme pandoc-mode markdown-mode gptel ellama)) + '(pdf-view-midnight-colors '("#655370" . "#fbf8ef"))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/.emacs-bookmarks b/.emacs-bookmarks new file mode 100644 index 0000000..818411a --- /dev/null +++ b/.emacs-bookmarks @@ -0,0 +1,20 @@ +;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*- +;;; This format is meant to be slightly human-readable; +;;; nevertheless, you probably don't want to edit it. +;;; -*- End Of Bookmark File Format Version Stamp -*- +((".emacs" + (filename . "~/.emacs") + (front-context-string . "(setq bookmark-d") + (rear-context-string . ")\n\n;; BOOKMARKS\n") + (position . 1385)) +("Finances.md" + (filename . "~/Cloud/Current/School/Finances.md") + (front-context-string . "# CU Expenses") + (rear-context-string) + (position . 1)) +("Proximate.md" + (filename . "~/Cloud/Notes/Proximate.md") + (front-context-string . "Notes") + (rear-context-string . " latest section\n") + (position . 1)) +) diff --git a/.gitignore b/.gitignore index e2bfbd0..4d09e6d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ !.templates/* !.bash_aliases !.emacs +!.emacs-* +!.vimrc !.gitconfig !.gitignore !.i3/* diff --git a/.scripts/install-emacs.el b/.scripts/install-emacs.el index 9e66609..92db5d2 100644 --- a/.scripts/install-emacs.el +++ b/.scripts/install-emacs.el @@ -8,6 +8,8 @@ (add-to-list 'load-path "~/.emacs.d/lisp/") (package-refresh-contents) -(package-install 'markdown-mode) -(package-install 'wc-mode) +(package-install 'use-package) (package-install 'magit) +(package-install 'markdown-mode) +(package-install 'pandoc-mode) +(package-install 'wc-mode) diff --git a/.scripts/install-vim.sh b/.scripts/install-vim.sh new file mode 100644 index 0000000..46a1169 --- /dev/null +++ b/.scripts/install-vim.sh @@ -0,0 +1,13 @@ + +# TODO have to clarify how to set the location of the .vimrc file + +# create symbolic link to the .vimrc +mkdir -p ~/.config/nvim +ln -s ~/.vimrc ~/.config/nvim/init.vim + +# install vim-plug +sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + +# TODO have to make sure to install the plugins + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..9674136 --- /dev/null +++ b/.vimrc @@ -0,0 +1,24 @@ +" ntnsndr's vimrc file + +" Basics +syntax on +set noerrorbells +set tabstop=4 softtabstop=4 +set linebreak +set wrap +nnoremap :set linebreak +nnoremap :set nolinebreak +set incsearch +set spell + +" Workspace location +let g:workspace_session_directory = $HOME . '/.vim/sessions/' + +" Plugins +call plug#begin() +"Plug 'plasticboy/vim-markdown' +Plug 'junegunn/goyo.vim' +Plug 'reedes/vim-pencil' +Plug 'vim-pandoc/vim-pandoc' +"Plug 'vim-pandoc/vim-pandoc-syntax' +call plug#end()