Skip to main content

Why Is Life This Way?

Why is life this way? I often wonder what’s going on with it, but I don’t have a clue how it’s meant to be at times. I wish I had a clue, honestly. But I don’t, so what’s the point of it all? If It’s meant to be a curse then let it be a curse. But, if it’s meant to be something different? Let it be different. Don’t let it be what you want it to be, be what it’s meant to be. Allow life to be whatever it needs to be, there’s nothing wrong with that. There are things in this life we don’t have control over, and that’s okay! If we can simply allow ourselves to become the better person, then we can allow such a life to continue. We can allow it to make us and form us, shape us even into the people we’re supposed to be.

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

Schizoaffective Disorder

I want to say it first began in High School when I thought I was trying to beat the devil. Now when I say I was "trying to beat the devil", I mean I actually thought I was hearing the devil speak to me at night and that I had to find some way to overcome him. Looking back I should have sought professional help then. I remember telling a friend about this experience, and he looked at me like I was nuts. Talk about craziness right? Yeah something like that. I believe my first mental break was when I was serving a mission for The Church of Jesus Christ of Latter-Day Saints . I wanted to go home so bad. It could have just been homesickness . But...there was something more to it. About halfway through I was just done with it all. I had had enough of rejection and wanted to go home. But I was afraid that I was unable to because I would simply be told no . I know that sounds silly to people. But that's what happened. I didn't b...

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.

Temptation Bible vs Book of Mormon

In the Bible in 1 Corinthians 10:13 we find: There hath no temptation taken you but such as is common to man: but God is faithful, who will not suffer you to be tempted above that ye are able ; but will with the temptation also make a way to escape, that ye may be able to bear it. But what might seem as a contradiction is found in Alma 13:28 But that ye would humble yourselves before the Lord, and call on his holy name, and watch and pray continually, that ye may not be tempted above that which ye can bear , and thus be led by the Holy Spirit, becoming humble, meek, submissive, patient, full of love and all long-suffering; So, which is it? Either God tempts you to a point and stops, or you have to actively pray not to be tempted beyond that no return point. Which is it?