There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer blue screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel firefox firefox 3 game hard drive hardware internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express partition password printer problem problems ram router slow sound trojan usb video virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Useful config settings


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
10-Oct-2005, 07:23 PM #1
Useful config settings
Code:
for most shells:

alias mv="nocorrect mv"
alias cp="nocorrect cp"
alias man="nocorrect man"
alias mkdir="nocorrect mkdir"
alias mcd="nocorrect mcd"
alias rm="nocorrect rm -i"
alias ping="ping -c4"
alias df="df -h"

calendar() {
   if [[ ! -f /usr/bin/cal ]] ; then
      echo "Please install cal before trying to use it!"
      return
   fi

   if [[ "$#" = "0" ]] ; then
      /usr/bin/cal | egrep -C 40 --color "\<$(date +%e| tr -d ' ')\>"
   else
      /usr/bin/cal $@ | egrep -C 40 --color "\<($(date +%B)|$(date +%e | tr -d  ' '))\>"
   fi
}

alias cal=calendar

basiccalc() {
   if [[ ! -f /usr/bin/bc ]] ; then
      echo "Please install bc before trying to use it!"
      return
   fi

   if [[ -z "$1" ]] ; then
      /usr/bin/bc -q
   else
      echo "$@" | /usr/bin/bc -l
   fi
}

alias bc=basiccalc
Code:
.vimrc
scriptencoding utf-8             " Use UTF-8

set encoding=utf-8               " Default encoding should always be UTF-8
set nocompatible                 " Don't emulate vi's limitations
set tabstop=3                    " Use 3 spaces for tabs
set shiftwidth=3                 " Use 3 spaces for next line indent
set smarttab                     " Tab next line based on current line
set expandtab                    " Use spaces for tabs
set autoindent                   " Automatically indent next line if indented
set smartindent                  " Indent next line based on current line
set linebreak                    " Display long lines wrapped at word boundary
set incsearch                    " Enable incremental search
set ignorecase                   " Ignore case when searching
set infercase                    " Try to figure out the case when searching
set hlsearch                     " Highlight the search results
set ve=block                     " Visual Edit Blocking
set lazyredraw                   " Enable Lazy Redraw (faster macro execution)
set showmode                     " Show the current mode
set showmatch                    " Show matching brackets
set mat=5                        " Blink for 5 seconds
set wildmenu                     " Enable wildmenu
set wildmode=list:longest,full   " Match the longest and full matches
set scrolloff=3                  " Show 3 lines of context on vertical scroll
set sidescrolloff=2              " Show 2 columns of context on horizontal scroll
set whichwrap+=<,>,h,l           " Backspace and cursor keys wrap
set backspace=2                  " Normal backspace behaviour
set nonumber                     " Do not display line numbers

set title                        " Set a title on the terminal
set laststatus=2                 " Always display the status line
set shortmess=atI                " Enable short messages (press a key is annoying)
set statusline=Editing:\ %r%t%m\ %=Location:\ Line\ %l/%L\ \ Col:\ %c\ (%p%%)


set antialias                    " Antialias font rendering
set lsp=0                        " Increase spacing (easier to read)
set hidden                       " Allow flipping of buffers without saving
set magic                        " Regular expresion characters have special meaning

colorscheme zellner              " Set a nice dark color scheme
set background=dark              " We use a dark background

" Always ignore these files
set wildignore=*.o,*~

if has("syntax")
   syntax on                     " Enable syntax highlighting
endif

if has("folding")
   set foldenable                " Enable folding
   set foldmethod=syntax         " Fold based on syntax

   " If window is greater than 90 characters, set a column for folds
   if has("eval")
      fun! <SID>WideFold()
         if winwidth(0) > 90
            setlocal foldcolumn=1
         else
            setlocal foldcolumn=0
         endif
      endfun
      
      if has("autocmd")
         autocmd BufEnter * :call <SID>WideFold()
      endif
   endif
endif

if has("eval")             
   filetype on             " Detect filetype by extension
   filetype indent on      " Enable indents based on extensions
   filetype plugin on      " Load filetype plugins
endif

" Enable modelines only on secure vim
if (v:version == 603 && has("patch045")) || (v:version > 603)
   set modeline
else
   set nomodeline
endif

" Turn off search hilite when idle
autocmd CursorHold * nohls | redraw

" Always refresh syntax from the start
autocmd BufEnter * syntax sync fromstart

" Mutt doesnt like UTF-8 :-(
autocmd BufRead,BufNewFile *
   \ if &ft == 'mail' |
   \  set fileencoding=iso8859-1 |
   \ endif

" subversion commit messages need not be backed up
autocmd BufRead svn-commit.tmp :setlocal nobackup

" Page using space
noremap <space> <C-f>

" Unhighlight on insert mode entry
noremap i :nohls<CR>i

" Map F3 to nohls
nmap <silent> <F3> :silent nohls<CR>
imap <silent> <F3> <c-o>:silent nohls<CR>

" Map F12 to numbering
nmap <silent> <F12> :silent set number!<CR>
imap <silent> <F12> <c-o>:silent set number!<CR>

" Don't force Column 0 for #
inoremap # X<BS>#

" Map <tab> to indent code
if has("autocmd")
   autocmd FileType c,cpp,java nmap <tab> =0<CR>
endif

Code:
.muttrc
set     abort_unmodified=yes            # Abort messages that are empty
set     abort_nosubject=yes             # Abort subjectless messages
set     check_new                       # Check for new messages
set     beep_new                        # Beep on new messages
set     fast_reply                      # Do not prompt for to, subject in fwd
set     hidden_host                     # Hide host name
set     markers                         # Place a + on wrapped lines
set     pager_stop                      # Don't jump to next message at end
set     smart_wrap                      # Wrap at word end
set     status_on_top                   # Status bar on top
set     strict_threads                  # Thread by In-Reply-To or Subject
set     suspend                         # CTRL-Z to suspend
set     mail_check=60                   # Autocheck mail time (seconds)
set     charset="utf-8"                 # Character set
set     indent_string="> "              # Quote character
set     locale="en_US"                  # Default locale

ignore  *
unignore From Date Subject To Cc Bcc

unhdr_order *
hdr_order       From: To: Cc: Bcc: Subject: Date:

color   status          white           brightblue
color   indicator       brightblue      white

color   body            brightcyan      black           "(http|ftp|news|telnet|finger|https)://[^ >]*"
color   body            brightcyan      black           "<URL:[^ ]*>"
color   error           brightred       black

color   header          brightgreen     black           ^(From|To):
color   header          brightmagenta   black           ^Subject:
color   header          green           black           ^Date:
color   hdrdefault      brightwhite     black

set attribution='On %{%a, %d %b %Y}, %n wrote:\n'
set index_format="%4C | %[%b %d]  %S  %-17.17F  %s"
set status_format="  %v    [%m messages, %n new, %u unread] %> (%P)  "

# *************************
# *** BEGIN PGP SECTION ***
# *************************
set pgp_autosign
set pgp_replysign
set pgp_timeout=600
set pgp_decode_command="/usr/bin/gpg    %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="/usr/bin/gpg    --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="/usr/bin/gpg   --passphrase-fd 0 --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="/usr/bin/gpg      --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="/usr/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="/usr/bin/gpg    --no-verbose --import -v %f"
set pgp_export_command="/usr/bin/gpg    --no-verbose --export --armor $r"
set pgp_verify_key_command="/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
pgp is if you use a key to sign inline etc your email. Anyone else care to add remove, some things that might be useful in your .config files ?
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:51 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.