VIM私人配置

leanote蚂蚁笔记 私人云笔记服务搭建 目前在知识管理/笔记类软件领域有强大的印象笔记 (Evernote)、微软(OneNote)、国产的(为知笔记)、(有道云笔记)以及(讯飞语记)等都是非常优秀的产品,但总有一部分人会觉得“把自己的笔记放在别人兜里,心里不踏实”。我一开始用的也是讯飞语记,刚开始还不懂,只是被它的语音识别和云同步所吸引。后来懂的越来越多,愈发觉得自己的一些笔记还是不要放别人的数据库里。碰巧,在阿里云的一篇学习文章里,我发现了leanote,于是乎我也就进入了私人云笔记时代! 阅读详情

在vim(gvim)中运行终端

http://www.vimer.cn/2010/06/%E5%9C%A8vimgvim%E4%B8%AD%E8%BF%90%E8%A1%8C%E7%BB%88%E7%AB%AF%E5%AF%B9%E4%BD%A0%E6%B2%A1%E6%9C%89%E7%9C%8B%E9%94%99%E6%88%91%E4%B9%9F%E6%B2%A1%E6%9C%89%E5%86%99%E5%8F%8D.html
下载地址:http://www.vim.org/scripts/script.php?script_id=2771

安装方法
下载conque_1.1.vba,用vim打开后,执行:so %,会自动执行安装.

使用方法
一共四个命令:
ConqueTerm : 在当前的窗口打开
ConqueTermSplit :横向分割一个窗口之后打开
ConqueTermVSplit :竖向分割一个窗口之后打开
ConqueTermTab :先建一个tab页之后打开

ConqueTerm bash

Vundle

(Vim bundle) 是一个vim的插件管理器。

git clone https://github.com/gmarik/vundle.git  ~/.vim/bundle/vundle

配置.vimrc文件

     set nocompatible               " be iMproved
     filetype off                   " required!       /**  从这行开始,vimrc配置 **/

     set rtp+=~/.vim/bundle/vundle/
     call vundle#rc()

     " let Vundle manage Vundle
     " required! 
     Bundle 'gmarik/vundle'

     " My Bundles here:  /* 插件配置格式 */
     "   
     " original repos on github (Github网站上非vim-scripts仓库的插件,按下面格式填写)
     Bundle 'tpope/vim-fugitive'
     Bundle 'Lokaltog/vim-easymotion'
     Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
     Bundle 'tpope/vim-rails.git'
     " vim-scripts repos  (vim-scripts仓库里的,按下面格式填写)
     Bundle 'L9'
     Bundle 'FuzzyFinder'
     " non github repos   (非上面两种情况的,按下面格式填写)
     Bundle 'git://git.wincent.com/command-t.git'
     " ... 

     filetype plugin indent on     " required!   /** vimrc文件配置结束 **/
     "                                           /** vundle命令 **/
     " Brief help
     " :BundleList          - list configured bundles
     " :BundleInstall(!)    - install(update) bundles
     " :BundleSearch(!) foo - search(or refresh cache first) for foo 
     " :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
     "   
     " see :h vundle for more details or wiki for FAQ 
     " NOTE: comments after Bundle command are not allowed..

:BundleList //会显示你vimrc里面填写的所有插件名称
:BundleInstall //会自动下载安装或更新你的插件

安装Emmet for Vim

Bundle 'mattn/emmet-vim'

Emmet.vim 教程

https://www.zfanw.com/blog/zencoding-vim-tutorial-chinese.html

目录树导航

‘目录文件导航
Bundle ‘scrooloose/nerdtree’

nmap <leader>nt :NERDTree<CR>
let NERDTreeHighlightCursorline=1
let NERDTreeIgnore=[ '.pyc$', '.pyo$', '.obj$', '.o$', '.so$', '.egg$', '^.git$', '^.svn$', '^.hg$' ]
let g:netrw_home='~/bak'
'close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr('$') == 1 && exists('b:NERDTreeType') && b:NERDTreeType == 'primary') | q | end

基本用法:



        1、在linux命令行界面,输入vim

        2、输入  :NERDTree ,回车

        3、进入当前目录的树形界面,通过小键盘上下键,能移动选中的目录或文件

        4、目录前面有+号,摁Enter会展开目录,文件前面是-号,摁Enter会在右侧窗口展现该文件的内容,并光标的焦点focus右侧。

        5、ctr+w+h  光标focus左侧树形目录,ctrl+w+l 光标focus右侧文件显示窗口。多次摁 ctrl+w,光标自动在左右侧窗口切换

        6、光标focus左侧树形窗口,摁? 弹出NERDTree的帮助,再次摁?关闭帮助显示

        7、输入:q回车,关闭光标所在窗口

标签导航

majutsushi/tagbar

nmap :TagbarToggle
let g:tagbar_autofocus = 1

YouCompleteMe

Compiling YCM with semantic support for C-family languages:

cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer

我的vimrc

set nocompatible              " be iMproved, required

filetype off                  " required



" set the runtime path to include Vundle and initialize

set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

" alternatively, pass a path where Vundle should install plugins

"call vundle#begin('~/some/path/here')



" let Vundle manage Vundle, required

Plugin 'VundleVim/Vundle.vim'



" The following are examples of different formats supported.

" Keep Plugin commands between vundle#begin/end.

" plugin on GitHub repo

"Plugin 'tpope/vim-fugitive'

" plugin from http://vim-scripts.org/vim/scripts.html

"Plugin 'L9'

" Git plugin not hosted on GitHub

"Plugin 'git://git.wincent.com/command-t.git'

" git repos on your local machine (i.e. when working on your own plugin)

"Plugin 'file:///home/gmarik/path/to/plugin'

" The sparkup vim script is in a subdirectory of this repo called vim.

" Pass the path to set the runtimepath properly.

"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}

" Avoid a name conflict with L9

"Plugin 'user/L9', {'name': 'newL9'}



" All of your Plugins must be added before the following line

call vundle#end()            " required

filetype plugin indent on    " required

" To ignore plugin indent changes, instead use:

"filetype plugin on

"

" Brief help

" :PluginList       - lists configured plugins

" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate

" :PluginSearch foo - searches for foo; append `!` to refresh local cache

" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal

"

" see :h vundle for more details or wiki for FAQ

" Put your non-Plugin stuff after this line



 Bundle 'scrooloose/nerdtree'

 Bundle 'altercation/vim-colors-solarized'

 Bundle 'tpope/vim-surround'

 Bundle 'majutsushi/tagbar'

 Bundle 'bling/vim-airline'

 Bundle 'ctrlpvim/ctrlp.vim'

 Bundle 'vim-scripts/sessionman.vim'

 Bundle 'easymotion/vim-easymotion'

 Bundle 'Lokaltog/vim-powerline'



            Bundle 'scrooloose/syntastic'

            Bundle 'tpope/vim-fugitive'

            Bundle 'mattn/webapi-vim'

            Bundle 'mattn/gist-vim'

            Bundle 'scrooloose/nerdcommenter'

            Bundle 'tpope/vim-commentary'

            Bundle 'godlygeek/tabular'

            Bundle 'luochen1990/rainbow'



    " Snippets & AutoComplete {

            Bundle 'Valloric/YouCompleteMe'

            Bundle 'SirVer/ultisnips'

            Bundle 'Shougo/neocomplcache'

            Bundle 'Shougo/neosnippet'

            Bundle 'Shougo/neosnippet-snippets'

            Bundle 'honza/vim-snippets'



    " PHP {

            Bundle 'spf13/PIV'

            Bundle 'arnaud-lb/vim-php-namespace'

            Bundle 'beyondwords/vim-twig'



    " Python {

            Bundle 'klen/python-mode'

            Bundle 'yssource/python.vim'

            Bundle 'python_match.vim'

            Bundle 'pythoncomplete'



    " Javascript {

            Bundle 'elzr/vim-json'

            Bundle 'groenewege/vim-less'

            Bundle 'pangloss/vim-javascript'

            Bundle 'briancollins/vim-jst'

            Bundle 'kchmck/vim-coffee-script'











    " HTML {

            Bundle 'amirh/HTML-AutoCloseTag'

            Bundle 'hail2u/vim-css3-syntax'

            Bundle 'gorodinskiy/vim-coloresque'

            Bundle 'tpope/vim-haml'

            Bundle 'mattn/emmet-vim'











""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" General {



    set background=dark         " Assume a dark background



    " Allow to trigger background

    function! ToggleBG()

        let s:tbg = &background

        " Inversion

        if s:tbg == "dark"

            set background=light

        else

            set background=dark

        endif

    endfunction

    noremap <leader>bg :call ToggleBG()<CR>



    " if !has('gui')

        "set term=$TERM          " Make arrow and other keys work

    " endif

    filetype plugin indent on   " Automatically detect file types.

    syntax on                   " Syntax highlighting

    set mouse=a                 " Automatically enable mouse usage

    set mousehide               " Hide the mouse cursor while typing

    scriptencoding utf-8



    if has('clipboard')

        if has('unnamedplus')  " When possible use + register for copy-paste

            set clipboard=unnamed,unnamedplus

        else         " On mac and Windows, use * register for copy-paste

            set clipboard=unnamed

        endif

    endif



     """"""""""""""""""

" Most prefer to automatically switch to the current file directory when

    " a new buffer is opened; to prevent this behavior, add the following to

    " your .vimrc.before.local file:

    "   let g:spf13_no_autochdir = 1



    "set autowrite                       " Automatically write a file when leaving a modified buffer

    set shortmess+=filmnrxoOtT          " Abbrev. of messages (avoids 'hit enter')

    set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility

    set virtualedit=onemore             " Allow for cursor beyond last character

    set history=1000                    " Store a ton of history (default is 20)

    "set spell                           " Spell checking on

    set hidden                          " Allow buffer switching without saving

    set iskeyword-=.                    " '.' is an end of word designator

    set iskeyword-=#                    " '#' is an end of word designator

    set iskeyword-=-                    " '-' is an end of word designator



""""""""""""""""""

    " Instead of reverting the cursor to the last position in the buffer, we

    " set it to the first line when editing a git commit message

    au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])



    " http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session

    " Restore cursor to file position in previous editing session

    " To disable this, add the following to your .vimrc.before.local file:

    "   let g:spf13_no_restore_cursor = 1

    if !exists('g:spf13_no_restore_cursor')

        function! ResCur()

            if line("'\"") <= line("$")

                silent! normal! g`"

                return 1

            endif

        endfunction



        augroup resCur

            autocmd!

            autocmd BufWinEnter * call ResCur()

        augroup END

    endif



    " Setting up the directories {

        set backup                  " Backups are nice ...

        if has('persistent_undo')

            set undofile                " So is persistent undo ...

            set undolevels=1000         " Maximum number of changes that can be undone

            set undoreload=10000        " Maximum number lines to save for undo on a buffer reload

        endif



        " To disable views add the following to your .vimrc.before.local file:

        "   let g:spf13_no_views = 1

        if !exists('g:spf13_no_views')

            " Add exclusions to mkview and loadview

            " eg: *.*, svn-commit.tmp

            let g:skipview_files = [

                \ '\[example pattern\]'

                \ ]

        endif

    " }



" }



""""""""""""""""""""""""""""

"vim ui

"solarized

syntax enable

set background=dark

colorscheme solarized



set tabpagemax=15               " Only show 15 tabs

set showmode                    " Display the current mode

set cursorline                  " Highlight current line



highlight clear SignColumn      " SignColumn should match background

highlight clear LineNr          " Current line number row will have same background color in relative mode



    set backspace=indent,eol,start  " Backspace for dummies

    set linespace=0                 " No extra spaces between rows

    set number                      " Line numbers on

    set showmatch                   " Show matching brackets/parenthesis

    set incsearch                   " Find as you type search

    set hlsearch                    " Highlight search terms

    set winminheight=0              " Windows can be 0 line high

    set ignorecase                  " Case insensitive search

    set smartcase                   " Case sensitive when uc present

    set wildmenu                    " Show list instead of just completing

    set wildmode=list:longest,full  " Command <Tab> completion, list matches, then longest common part, then all.

    set whichwrap=b,s,h,l,<,>,[,]   " Backspace and cursor keys wrap too

    set scrolljump=5                " Lines to scroll when cursor leaves screen

    set scrolloff=3                 " Minimum lines to keep above and below cursor

    set foldenable                  " Auto fold code

    set list

    set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace





" Formatting {



    set nowrap                      " Do not wrap long lines

    set autoindent                  " Indent at the same level of the previous line

    set shiftwidth=4                " Use indents of 4 spaces

    set expandtab                   " Tabs are spaces, not tabs

    set tabstop=4                   " An indentation every four columns

    set softtabstop=4               " Let backspace delete indent

    set nojoinspaces                " Prevents inserting two spaces after punctuation on a join (J)

    set splitright                  " Puts new vsplit windows to the right of the current

    set splitbelow                  " Puts new split windows to the bottom of the current

    "set matchpairs+=<:>             " Match, to be used with %

    set pastetoggle=<F12>           " pastetoggle (sane indentation on pastes)

    "set comments=sl:/*,mb:*,elx:*/  " auto format comment blocks

    " Remove trailing whitespaces and ^M chars

    " To disable the stripping of whitespace, add the following to your

    " .vimrc.before.local file:

    "   let g:spf13_keep_trailing_whitespace = 1

    autocmd FileType c,cpp,java,go,php,javascript,puppet,python,rust,twig,xml,yml,perl,sql autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif

    "autocmd FileType go autocmd BufWritePre <buffer> Fmt

    autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig

    autocmd FileType haskell,puppet,ruby,yml setlocal expandtab shiftwidth=2 softtabstop=2

    " preceding line best in a plugin but here for now.



    autocmd BufNewFile,BufRead *.coffee set filetype=coffee



    " Workaround vim-commentary for Haskell

    autocmd FileType haskell setlocal commentstring=--\ %s

    " Workaround broken colour highlighting in Haskell

    autocmd FileType haskell,rust setlocal nospell



" }





 let mapleader = ','



 let maplocalleader = '_'







""""""""""""""""""""""""""""""""""



"kuaijiejian

            map <C-e> <plug>NERDTreeTabsToggle<CR>

            map <leader>e :NERDTreeFind<CR>

            nmap <leader>nt :NERDTreeFind<CR>

            let NERDTreeShowBookmarks=1

            let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']

            let NERDTreeChDirMode=0

            let NERDTreeQuitOnOpen=1

            let NERDTreeMouseMode=2

            let NERDTreeShowHidden=1

            let NERDTreeKeepTreeInNewTab=1

            let g:nerdtree_tabs_open_on_gui_startup=0



            map <silent> <F4> :TagbarToggle<CR>





    " PyMode {

        " Disable if python support not present

        if !has('python') && !has('python3')

            let g:pymode = 0

        endif



            let g:pymode_lint_checkers = ['pyflakes']

            let g:pymode_trim_whitespaces = 0

            let g:pymode_options = 0

            let g:pymode_rope = 0

    " }





 nnoremap <silent> <D-t> :CtrlP<CR>





 let g:rainbow_active = 1



            let g:acp_enableAtStartup = 0



            " enable completion from tags

            let g:ycm_collect_identifiers_from_tags_files = 1



            " remap Ultisnips for compatibility for YCM

            let g:UltiSnipsExpandTrigger = '<C-j>'

            let g:UltiSnipsJumpForwardTrigger = '<C-j>'

            let g:UltiSnipsJumpBackwardTrigger = '<C-k>'



            " Enable omni completion.

            autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS

            autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags

            autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS

            autocmd FileType python setlocal omnifunc=pythoncomplete#Complete

            autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags

            autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete

            autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc







 set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine



 set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize

  nmap <leader>sl :SessionList<CR>

   nmap <leader>ss :SessionSave<CR>

    nmap <leader>sc :SessionClose<CR>



     imap kj <esc>

三分钟教你如何搭建私人服务器 搭建私人服务器可能需要一些基础的计算机知识和技能。以下是一个简单的指南,以帮助你开始搭建私人服务器。请注意,这是一个简化的过程,具体步骤可能会因你的需求和操作系统而异。技术大佬可自行搭建,小白可以直接快速搭建。 阅读详情

相关推荐

K8s入门教程(一)

本教程提供了Kubernetes(K8s)的入门指南,涵盖了从基础概念到实战操作的全面内容。首先介绍了Kubernetes的定义和核心功能,如自动化部署、弹性伸缩、自我修复等。接着,详细讲解了如何在macOS上安装Minikube和kubectl工具,以及如何使用这些工具创建和管理Pod、Deployment和Service等核心资源。教程还包括了实战案例,如部署Nginx应用,并介绍了高级特性如滚动更新和自动伸缩。最后,提供了常见问题的解决方案,帮助用户快速上手和解决实际使用中的问题。

2401_82505179的博客 1689

vim安装bundle和使用

一、准备工作 安装Git(因为下面我们选择的插件管理器需要使用到它) 安装其他插件前首先需要选择一个Vim插件管理器,我这里选择的是Vundle,Vundle的工作过程中需要通过Git自动从远程创库同步插件安装包到本地仓库(Vundle的默认本地仓库位置是~/.vim/bundle/) 通过Git下载Vundle安装包: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 安装好后,如果需要安装新插件。

习惯就好zz的专栏 2880

【BigWorld 游戏服务器引擎】Cell 架构设计介绍,及Java实现方案的探索

横向扩展(Scalability):通过动态增减CellApp和BaseApp的数量,可以轻松应对玩家人数的变化。世界可以做得非常大,只需增加更多的 Cell。负载分离(Load Separation):将不同性质的负载分离,避免了单一进程瓶颈。CPU 密集型的实时计算(CellApp)和 I/O 密集型的数据操作(BaseApp)互不影响。高效的视野管理(AOI):每个 Cell 只关心自己区域内和边界上的实体,大大降低了计算复杂度。容错性:某个CellApp。

代码时光 1203

VIM常用插件

acp.vim  code_complete.vim  cscope_maps.vim  c.vim  taglist.vim

临渊羡鱼 不如退而结网 635

USRP B210 运行gnuradio时 FPGA固件版本冲突错误解决方法

事情起源于昨天拿到USRP后开始调试,结果整了一个下午都没解决这个问题。 昨天晚上自己思考了一下,觉得还是版本问题。 首先,uhd_find_devices和uhd_usrp_probe均可以正常运行,没有报错,固件正常加载,序列号也可看到。 teray@teray-X550JK:~$ uhd_find_devices [INFO] [UHD] linux; GNU C++ version 7.5...

斯哈研究所 4243

高性能C#上位机:多串口并发,百万数据不卡顿

去年做了一个环境监测项目,要对接32个串口传感器,每个传感器每秒发10条数据,一天下来就是2700多万条数据,之前的老程序跑起来UI直接卡死,数据丢包率高达10%,存到数据库要卡半天,客户要求数据丢包率为0,UI响应延迟≤100ms,百万级数据查询≤1s。这套多串口通信方案已经用在了我们公司10多个项目上,最多支持64个串口同时并发,每秒处理3000条数据,完全不卡顿,数据零丢包,客户非常满意,最近做的一个光伏监测项目,对接了48个串口传感器,稳定运行了6个月,没有出过任何问题。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 423

vim的高级用法

Vim 编辑器中的一款很强大插件—— VIM Fugitive 。这款插件可以实现你在 Vim 编辑器里直接完成 Git 操作,而无需退出 Vim 。 这个插件是开源项目,我们可以在以下地址获取源码: https://github.com/tpope/vim-fugitive 安装方法: cd ~/.vim/bundle git clone https://github.com/tpop...

436

Cadence SPB16. 6 安装流程

1.首先下载CadenceAllegroSPBorCAD16.6安装包 下载之后运行其中的setup.exe,然后先安装第一项LicenseManager 一直按next或install, 直到被询问license时,单击cancel,然后选是和finish。 2,安装Product Installtion 直接点next跳过这一步 安装完成后,点Exit退出 3.按ctrl+alt+delete打开任务管...

wangjie36的博客 5145

【亲测免费】 探索 Vim 的强大扩展:Fugitive

探索 Vim 的强大扩展:Fugitive 是一款为 Vim 打造的 Git 集成插件,由著名 Vim 插件开发者 Tim Pope 编写。这款插件将 Git 命令无缝融入 Vim,让开发者无需离开编辑器就能执行各种 Git 操作,极大地提升了开发效率。 技术分析 Fugitive 使用 Vimscript 编写,与 Vim 的核心功能深度集成。它通过解析 Git 工作目录下的 .git 目录信息...

gitblog_00019的博客 1011

全局–局部傅里叶神经算子(GL-FNO):原理、严格推导与 PINN 混合策略

本文提出了一种全局-局部傅里叶神经算子(GL-FNO)及其与物理信息神经网络(PINN)的结合方法。主要内容包括: 架构设计:GL-FNO包含两个分支 - 全局分支处理低频结构,使用下采样输入;局部分支处理高频细节,使用全分辨率输入。两分支通过自适应门控机制融合。 理论分析:证明了GL-FNO在"低频全局+高频局部"任务上的优势,给出了误差分解和复杂度分析,并推导了与PINN结合时的渐进一致性条件。 实现方法:采用频谱微分计算物理残差,推导了完整的训练流程,包括数据损失与物理损失的联合优

VectorShift的博客 1330

Wazuh部署记录

Wazuh是一个免费的开源安全平台,统一了XDR和SIEM功能。它可以保护内部部署、虚拟化、容器化和基于云的环境中的工作负载。Wazuh帮助组织和个人保护其数据资产免受安全威胁。它被全球数千个组织广泛使用,从小型企业到大型企业。443:仪表盘界面访问端口1515:探针连接服务器端口1514:探针回传信息端口以上3个端口必须打开防火墙。

墨痕诉清风的博客 1557

Bundle管理Vim插件

1. 什么是Vundle? Vundle(https://github.com/VundleVim/Vundle.vim)的全称是Vim Bundle,它是一款Vim插件管理工具。Vundle让你可以非常轻松地安装、更新、搜索和清理Vim插件。它还能管理你的运行时环境,并帮助标记。我在本教程中将介绍如何安装和使用Vundle。 2. 安装Vundle 首先,在~/.vim目录

Second的专栏 3344

RT-DETR改进策略【小目标改进】| Shape-NWD:融合改进,结合Shape-IoU和NWD 更好地适应小目标特性

Bw−wgt2h−hgt2weight2Bweight2w−wgt​2h−hgt​2​其中weight2weight = 2weight2。

Limiiiing的博客 1544

vim编辑器的使用

我们最好不要在root权限下去进行vim配置,因为vim下已经有了.vimrc的配置文件,用自己私人账号去配置,这样可以让每一个用户能够配置自己的vim。ctrl + v 然后从光标位置 按 数字+shift + g,然后再按 I // ,就是从光标位置的代码一直注释到该数字那一行的代码。在底行模式下我们还可以查找指定字符,输入字符然后按回车,再按n就可以上下移动(在指定的字符上下行号移动)我们先创建一个test.c的文件,然后vim编辑test.c,就直接进入了命令模式,也就是默认模式。

2301_79811170的博客 754

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

PicGo + Gitee + VsCode - 搭建私人图床

本人是一个重度 vimer,并且喜欢客制化一些东西… Typora 固然好用,但不支持 vim…发现 vscode 中既可以使用 vim,也可以 md,用起来比较舒服.因此这里就搭建一个图床供 vscode 写博客使用.

CYK_byte的博客 1242

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

python私人定制_私人定制--mac配置篇

为什么讲是私人定制呢? 因为mac从入手, 大部分的软件和环境等都需要自己不断的去更新配置, 可以看到的是, 我们可能后面的环境配置会更新掉前面的环境配置,像本节接下来要说的关于原装vim的配置, 会在后面安装了macvim后, 环境配置得到了重新的配置, 当前的配置永远不可能固定下来, 可能后面配置就会颠覆之前的配置, 以得到功能更大的升华, 就是这样不断的去颠覆之前, 才能更好的为自己所用, ...

weixin_34464974的博客 201

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

科研新手避坑:用 Git + Gitee 备份标注数据到云端的完整踩坑记录

【代码】科研新手避坑:用 Git + Gitee 备份标注数据到云端的完整踩坑记录。

weixin_43913071的博客 206

私人订制docker化vim

vim有一个豪华配置方案 spf-13, 但在不同的vps上安装vim时总得从头安装之后上传.vimrc文件。有没有办法可以自动化这个过程呢? 可以编写shell脚本每次执行;也可以借助docker来实现 Build once,run anywhere。Configure once,Run anything。 下面介绍一下将vim-spf13及常用配置文件docker化的步骤:注: 1. 使

stepup 1695

vim的私人订制

最近恶补嵌入式的知识,希望能做一些嵌入式和机器视觉相结合的有意思的东西。 习惯了IDE,vim编写需要一些插件才能更高效。今天总结一下。 安装插件管理Vundle 克隆项目到本地 git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 配置vimrc文件 set nocompatible...

量子象限 407

ale插件 vim_简单几步,打造你的私人vim!

习惯了IDE,vim编写需要一些插件才能更高效。安装插件管理Vundle克隆项目到本地git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim配置vimrc文件set nocompatible " be iMproved, required filetype off ...

weixin_34778803的博客 897

私人Git远程仓库的进阶配置

私人Git远程仓库的进阶配置ssh免密登录本地端的准备远程端(git仓库端的准备)本地新建远程仓库 #私人Git远程仓库的进阶配置 阅读本文的必要条件: linux命令行的基本操作 git 的基本使用 ssh免密登录 本地端的准备 生成密钥 使用git bash 执行以下命令cd ~ ssh-keygen -t rsa # 生成的密钥代表你这台电脑 打开 用户文件夹下/.ss...

Kim_小星兴的自留地 256

搭建 Git 私人服务器完整指南

本篇博客详细介绍了如何从零搭建一个 Git 私人服务器,适用于需要对代码仓库进行自主控制和管理的开发者或团队。文章首先简要介绍了 Git 的基础知识及搭建私人服务器的意义,接着从环境准备、Git安装、配置SSH访问到搭建裸仓库的详细步骤进行了全方位讲解。此外,文章还涵盖了如何通过 Git 自带的 git daemon、SSH 协议搭建安全的 Git 服务器,以及使用 Gitolite 和 Gitea 等工具来扩展权限管理和提供 Web 界面。最后,文章还分享了服务器的日常维护、日志监控和自动备份策略,帮助读

Lenyiin 2万+

私人Git服务器SSH免密登录配置成功不生效问题

私人Git配置 私人Git服务器在进行SSH免密登录配置后,出现了配置成功却不生效的问题,由此引发了接下来的总结的一系列解决操作。 问题描述 在用服务器搭载此Hexo网站时,见到大部分人都将自己的服务器部署为私人Git服务器,以方便Push Hexo渲染出来的静态网站,但是对于一个Git小白来说有些问题难免会遇到,这次就遇到了在设置好SSH密钥的情况下仍需密码认证的情况。 详细流程 本地Git部署 下载、安装Git后进入Git Bash 输入以下两行代码以设置个人信息 git config --gl

BaldwinM的博客 1997

docker 拉去pull、推送push 镜像到私人仓库

下面以阿里云私人仓库和默认的dockerhub仓库为例,其他仓库类似 一、centos安装docker 简单说一下docker安装,支持centos7及以上版本 1. 卸载旧版本 yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine 2. 安装必要的一些系统工具 y

不懂一休 2万+

gentoo ebuild 私人portage

gentoo ebuild 私人portage 最近考虑搞个私人 portage, 用于一些软件的安装和管理。 mkdir -p /usr/local/portage/app-misc/hello-world cd $_ cp /usr/portage/header.txt ./hello-world-1.0.ebuild vim hello-...

weixin_30284355的博客 294

打造属于自己的私人云笔记

现在市面上支持私有化部署的云笔记选择不多,而且大多数只支持mackDown语法,不支持word等其他文件的编辑,基于此需求,能不能有一款笔记软件,支持多平台,能够理论上编辑任何文件,并且支持数据私有保存,经过长期的试用各种云笔记和总结。决定使用私有云盘+webdav协议的方式实现。

weixin_43435307的博客 5100
上一篇: ubuntu开关防火墙
下一篇: Linux 安装、卸载程序
zerobug---
博客等级 码龄12年 29粉丝 25原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值