Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: programování pro Linux i Windows  (Přečteno 10958 krát)

nettezzaumana

  • Host
Re: programování pro Linux i Windows
« Odpověď #25 kdy: 12 Července 2008, 00:12:24 »
pridavam jako bonus sve ~/.vimrc >>

Citace
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim

" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
"    \| exe "normal g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules according to the
" detected filetype. Per default Debian Vim only load filetype specific
" plugins.
"if has("autocmd")
"  filetype indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd          " Show (partial) command in status line.
set showmatch      " Show matching brackets.
set ignorecase    " Do case insensitive matching
set smartcase      " Do smart case matching
set incsearch      " Incremental search
set autowrite      " Automatically save before commands like :next and :make
set hidden             " Hide buffers when they are abandoned
"set mouse=a        " Enable mouse usage (all modes) in terminals

" Source a global configuration file if available
" XXX Deprecated, please move your changes here in /etc/vim/vimrc
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif
set hlsearch
nnoremap <silent> <C-n> :tabnext<CR>
nnoremap <silent> <C-p> :tabprevious<CR>
set wildmode=list:longest,full
set gdefault

" spelling
let IspellLang = 'british'
let PersonalDict = '~/.ispell_' . IspellLang
execute 'set dictionary+=' . PersonalDict
set dictionary+=/usr/dict/words
set complete=.,w,k
set infercase
execute 'nnoremap \si :w<CR>:!ispell -x -d ' . IspellLang . ' %<CR>:e<CR><CR>'
execute 'nnoremap \sl :w ! grep -v "^>" <Bar> grep -E -v "^[[:alpha:]-]+: " ' .
  \ '<Bar> ispell -l -d ' . IspellLang . ' <Bar> sort <Bar> uniq<CR>'
nnoremap \sh :call HighlightSpellingErrors()<CR><CR>
nmap <F9> \sh
nnoremap \sc :if &ft == 'html' <Bar> sy on <Bar>
  \ else <Bar> :sy clear SpellError <Bar> endif<CR>
nmap <F10> \sc
set title
set ls=2
function! HighlightSpellingErrors()
" highlights spelling errors in the current window; used for the \sh operation
" defined above;
" requires the ispell, sort, and uniq commands to be in the path;
" requires the global variable IspellLang to be defined above, and to contain
" the preferred `Ispell' language;
" for mail/news messages, requires the grep command to be in the path;
" for HTML documents, saves the file to disk and requires the lynx command to
" be in the path
"
" by Smylers  http://www.stripey.com/vim/
" (inspired by Krishna Gadepalli and Neil Schemenauer's vimspell.sh)
"
" 2000 Jun 1: for `Vim' 5.6

  " for HTML files, remove all current syntax highlighting (so that
  " misspellings show up clearly), and note it's HTML for future reference:
  if &filetype == 'html'
    let HTML = 1
    syntax clear

  " for everything else, simply remove any previously-identified spelling
  " errors (and corrections):
  else
    let HTML = 0
    if hlexists('SpellError')
      syntax clear SpellError
    endif
    if hlexists('Normal')
      syntax clear Normal
    endif
  endif

  " form a command that has the text to be checked piping through standard
  " output; for HTML files this involves saving the current file and processing
  " it with `Lynx'; for everything else, use all the buffer except quoted text
  " and mail/news headers:
  if HTML
    write
    let PipeCmd = '! lynx --dump --nolist % |'
  else
    let PipeCmd = 'write !'
    if &filetype == 'mail'
      let PipeCmd = PipeCmd . ' grep -v "^> " | grep -E -v "^[[:alpha:]-]+:" |'
    endif
  endif

  " execute that command, then generate a unique list of misspelt words and
  " store it in a temporary file:
  let ErrorsFile = tempname()
  execute PipeCmd . ' ispell -l -d '. g:IspellLang .
    \ ' | sort | uniq > ' . ErrorsFile

  " open that list of words in another window:
  execute 'split ' . ErrorsFile

  " for every word in that list ending with "'s", check if the root form
  " without the "'s" is in the dictionary, and if so remove the word from the
  " list:
  global /'s$/ execute 'read ! echo ' . expand('<cword>') .
    \ ' | ispell -l -d ' . g:IspellLang | delete
  " (If the root form is in the dictionary, ispell -l will have no output so
  " nothing will be read in, the cursor will remain in the same place and the
  " :delete will delete the word from the list.  If the root form is not in the
  " dictionary, then ispell -l will output it and it will be read on to a new
  " line; the delete command will then remove that misspelt root form, leaving
  " the original possessive form in the list!)

  " only do anything if there are some misspellings:
  if strlen(getline('.')) > 0

    " if (previously noted as) HTML, replace each non-alphanum char with a
    " regexp that matches either that char or a &...; entity:
    if HTML
      % substitute /\W/\\(&\\|\&\\(#\\d\\{2,4}\\|\w\\{2,8}\\);\\)/e
    endif

    " turn each mistake into a `Vim' command to place it in the SpellError
    " syntax highlighting group:
    % substitute /^/syntax match SpellError !\\</
    % substitute /$/\\>!/
  endif

  " save and close that file (so switch back to the one being checked):
  exit

  " make syntax highlighting case-sensitive, then execute all the match
  " commands that have just been set up in that temporary file, delete it, and
  " highlight all those words in red:
  syntax case match
  execute 'source ' . ErrorsFile
  call delete(ErrorsFile)
  highlight SpellError term=reverse ctermfg=DarkRed guifg=Red

  " with HTML, don't mark any errors in e-mail addresses or URLs, and ignore
  " anything marked in a fix-width font (as being computer code):
  if HTML
    syntax case ignore
    syntax match Normal !\<[[:alnum:]._-]\+@[[:alnum:]._-]\+\.\a\+\>!
    syntax match Normal
      \ !\<\(ht\|f\)tp://[-[:alnum:].]\+\a\(/[-_.[:alnum:]/#&=,]*\)\=\>!
    syntax region Normal start=!<Pre>! end=!</Pre>!
    syntax region Normal start=!<Code>! end=!</Code>!
    syntax region Normal start=!<Kbd>! end=!</Kbd>!
  endif

endfunction " HighlightSpellingErrors()

set paste
colorscheme desert

" tabspaces

set tabstop=4
set shiftwidth=4
set expandtab

set statusline=%<%f%<%{FileTime()}%<%h%m%r%=%-20.(line=%03l,col=%02c%V,totlin=%L%)\%h%m%r%=%-30(,BfNm=%n%Y%)\%P\*%=%{CurTime()}
set rulerformat=%15(%c%V\ %p%%%)
"set rulerformat=%<%f%<%{FileTime()}%<%h%m%r%=%-20.(line=%03l,col=%02c%V,totlin=%L%)\%h%m%r%=%-30(,BfNm=%n%Y%)\%P\*%=%{CurTime()}

fu! FileTime()
        let ext=tolower(expand("%:e"))
        let fname=tolower(expand('%<'))
        let filename=fname . '.' . ext
        let msg=""
        let msg=msg." ".strftime("(Modified %b,%d %y %H:%M:%S)",getftime(filename))
        return msg
endf

fu! CurTime()
        let ftime=""
        let ftime=ftime." ".strftime("%b,%d %y %H:%M:%S")
        return ftime
endf

set backspace=2

Flavicius

  • Návštěvník
  • Příspěvků: 87
Re: programování pro Linux i Windows
« Odpověď #26 kdy: 14 Července 2008, 09:25:06 »
Za všechno může programování!
------------------------------------
Doporučuji všem, kteří nevědí, jakou si vybrat kravatu k obleku: http://vyberkravatu.cz

pxjava

  • Návštěvník
  • Příspěvků: 96
    • Horejsek.com
Re: programování pro Linux i Windows
« Odpověď #27 kdy: 17 Července 2008, 17:20:24 »
ja bych volil C/C++ nebo python :)
Ubuntu 9.10
Asus P5Q; Intel Core 2 Duo E8500; 2x 2048MB DDR2; GeForce 9600GT 512MB; SBA 7.1; Samsung SyncMaster 205bw; Logitech Wave; 2x WESTERN DIGITAL Caviar Green 1.5T a Seagate 500G
Osobni web www.horejsek.com

trsek

  • Návštěvník
  • Příspěvků: 20
    • Programovanie v Pascale
Re: programování pro Linux i Windows
« Odpověď #28 kdy: 14 Září 2008, 14:28:54 »
najskor asi Java. Tusim aj firefox je v tom spraveny...

To urcite nie.

qUAKER

  • Host
Re: programování pro Linux i Windows
« Odpověď #29 kdy: 14 Září 2008, 14:37:32 »
pythona + pygtk.

wam]Spider007

  • Host
Re: programování pro Linux i Windows
« Odpověď #30 kdy: 14 Září 2008, 15:10:27 »
ja ako niekdajsi Visual Basic-ar som objavil Gambas (co je obdobny jazyk aj prostredie v linuxe). Skoda, ze som to neobjavil uz skorej, len ma mrzi, ze k tomu je velmi malo kniziek pripadne inych publikacii.

nettezzaumana

  • Host
Re: programování pro Linux i Windows
« Odpověď #31 kdy: 15 Září 2008, 08:15:27 »
python je peknej chlivek ;)

qUAKER

  • Host
Re: programování pro Linux i Windows
« Odpověď #32 kdy: 15 Září 2008, 15:08:19 »
python je peknej chlivek ;)

python je dobrý.. dá se v něm naučit rychle, je tu snadný vývoj GUI(Glade..) a programy vytvořené v něm jsou celkem rychlé.

 

Provoz zaštiťuje spolek OpenAlt.