Skip to main content

Notebooks!

So, I have seven new shiny notebooks, with pens, to write in! SEVEN OF THEM! Yes I get excited by notebooks in general. I enjoy writing, it’s what I do best…most of the time. There isn’t always a way to tell if I’m doing good at it though. But I have notebooks to write in, so that excites me beyond any reason of the imagination at all. If I can write in something physical, and not have to be on my computer? I’d rather be writing that way. It’s just how life feels at times. I like it. But if I have to write using my computer, then that’s okay too. Eventually whatever I end up writing will end up in my computer at some point in space or another. It’s just a given fact. AND, the notebooks are different colors! So if I wanted to, I could color coordinate them by series I’m working on or whatever. They’re good colors too. Yellow Orange Purple Green Blue Okay so that’s not seven different colors. But hey it works! I’m happy with it! (and I deserve to be happy)

Added some bindings to my vimrc

So, I added the following to my vimrc:

" Change Leader Key to a comma, that '\' is so hard to reach
let mapleader = ","

" Set the maximum width of text to 80 characters
set textwidth=80

" Optional visual indicator for the 80th column
set colorcolumn=80

" Show line numbers
set number

" File type detection, plugins, and smart indentation
filetype plugin indent on

" formatoptions settings:
" t: Auto-wrap text using textwidth
" c: Auto-wrap comments using textwidth
" q: Allow formatting of comments with "gq"
set formatoptions+=tcq

" Tabs and Spaces Setup
set expandtab     " Use spaces instead of tabs
set tabstop=4      " Number of spaces that a tab counts for
set shiftwidth=4   " Number of spaces to use for each step of autoindent
set softtabstop=4  " Number of spaces that a tab counts for while editing

" Enable syntax highlighting
syntax enable

" Always show the status line
set laststatus=2

" Define the format (File path, Modified flag, Type, Line/Col, Percentage)
set statusline=%f\ %m\ %y\ %=%l:%c\ %p%%
set statusline+=\ %{wordcount().words}\ words

" Enable spell check
set spell

" Spell check look and feel
hi clear SpellBad
hi SpellBad cterm=underline ctermfg=red ctermbg=NONE
hi SpellBad gui=undercurl

" ==============================================================================
" KEY MAPPINGS
" ==============================================================================

" Insert date with comment tag in INSERT mode
inoremap <C-d> <C-R>=strftime("# %a %b %d %I:%M:%S %p %Z %Y")<CR>

" Save file with Ctrl+S in INSERT mode
inoremap <C-s> <Esc>:w<CR>a

" Comment out a line of code with //
nnoremap <Leader>/ I// <Esc>

" Uncomment a single line in NORMAL mode
nnoremap <Leader>u :s/^\/\/ //e<CR>

" ==============================================================================
" LANGUAGE SPECIFIC SETTINGS & ABBREVIATIONS
" ==============================================================================

" Java specific rules
augroup java_settings
    autocmd!
    " Turn on C-indenting ONLY for Java files
    autocmd FileType java setlocal cindent
    autocmd FileType java iabbrev <buffer> pvm public static void main(String[] args) {<CR>}<Esc>O
    " Auto-close curly braces and drop to a new line
    autocmd FileType java inoremap {<CR> {<CR>}<Esc>O
augroup END

" Perl specific rules
augroup perl_settings
    autocmd!
    " Perl Header Template
    autocmd FileType perl iabbrev <buffer> perlheader #!/usr/bin/perl<CR>use strict;<CR>use warnings;<CR><CR>
    
    " Perl MySQL Connection Template (with safety paste toggle)
    autocmd FileType perl iabbrev <buffer> dbconnect <C-O>:set paste<CR>use DBI;<CR><CR>my $dsn = "DBI:mysql:database=dbname;host=localhost";<CR>my $user = "username";<CR>my $password = "password";<CR><CR>my $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, AutoCommit => 1 })<CR>or die "Connection failed: " . DBI->errstr;<CR><C-O>:set nopaste<CR>
augroup END

Comments

Popular posts from this blog

Didn't Sleep

 What's the point of sleep anymore if I can't sleep? I don't think I slept any good last night. I was awake at 3 am wondering to myself, what on earth am I doing awake? Yeah, that happened. It doesn't make any sense. Fortunately, it's the weekend. So, I can catch up on sleep tonight. I don't have to be anywhere tomorrow, so it's a good opportunity to actually sleep for once. Whatever the case, I hope I'll be able to fall asleep and stay asleep. We will see what happens.

What's The Point?

 So, tell me, what is the point of believing in a spiritual supreme being? I often wonder what that is all about. I know religions say that God, as some call him, is our father. We pray by starting with our father who art in heaven, hallowed be thy name. Yet sometimes it feels like he is absent from our lives. Is it due to how we are living our lives? What exactly is the cause of that feeling? Some people believe that God, Jesus, and the Holy Ghost are one person. Others do not. It is interesting to me to see what all churches believe in. I myself do not go to church. I don't believe in organized religion. I have my bible on my phone, so it's me and my bible. That is my link to God. It makes me wonder if that's enough though. I have faith in Christ, I believe in him. Is my faith sufficient to be forgiven of my sins? I do not know. I do know that wherever I end up in the afterlife, I will have done my best to follow Christ. I believe the scriptures which lay out Christ's...

Depression

 Depression is not something to be taken lightly. Having Major Depressive Disorder, I can only hope for a better future. I get it a lot of people wish to have a better future. There's nothing wrong with that. I don't think. Why not wish for a better life? If wishing works, let it work. Personally I wish the voices would leave me, but it's not as simple as that. They run amok from time to time. My only hope is that they'll get a clue. Yeah it's crazy at times that's for sure. If I could, I'd wish them upon no one else.