zoukankan      html  css  js  c++  java
  • [笔记]Ubuntu12.04系统安装的一些工具

    一、拼音或五笔

      安装,也可以安装五笔的包

    sudo add-apt-repository ppa:fcitx-team/nightly
    sudo apt-get update
    sudo apt-get install fcitx fcitx-googlepinyin

      将fcitx设为系统默认输入法:

      System Setting >>Language surpport >> Language >> Keyborad input method system >> fcitx
      fictx开机自启动:
      System Setting >> Startup Applications >> Add

      Name: Fcitx
      Command: /usr/bin/fcitx -d
      Comment:Fcitx startup

    按Ctrl+space调出

    二、英汉词典

      1.在Ubuntu软件中心搜索stardict(星际译王)安装辞典

      2.到http://abloz.com/huzheng/stardict-dic/zh_CN/ 下载需要的词库。(原来的官网已无法下载、找很久才找到这个网站)

      3.打开终端cd到下载的文件夹,然后sudo tar -xjvf stardict-oxford-gb-2.4.2.tar.bz2进行解压

      4.sudo mv stardict-oxford-gb-2.4.2 /usr/share/stardict/dic/      #把解压后的词典移动到星际译王目录下,一般安装stardict后就有这些目录,如果没有就要自己创建

      5.打开stardict,在辞典管理可以看到增加的词库

    三、设置Vim

      1、设置Vim的TAB键

      打开vimrc文件:sudo vim /etc/vim/vimrc,在文件后加以下内容: 

    " size of a hard tabstop
    set tabstop=4
    
    " size of an indent
    set shiftwidth=4
    
    " uses spaces instead of tab characters
    set expandtab

      以上设置是把Tab键的宽度设置成4个空格、缩进为4个空格、按下Tab键时插入4个空格。

      2、设置自动显示行号,自动缩进(Python语言,加上面的TAB键设置)

      打开vimrc文件,在文件后加上以下内容

    set nu                " 显示行号
    set autoindent " 自动缩进
    set cindent " 特别针对 C语言语法自动缩进

    set smartindent       " next level indent
    
    
    set softtabstop=4     " 退格时删除4个空格
     

      3、Vim 中 html 标签 a 去除下划线

    let html_no_rendering=1

       4、粘贴到Vim时,缩进错乱

    当Vim的自动缩进打开的时候,粘贴到终端Vim的code会出现缩进错乱的情况;好在Vim提供了past和pastetoggle选项,只要把这一行加入的vimrc文件;在粘贴时按F2进入粘贴模式,再次按F2则退出粘贴模式;

    set pastetoggle=<F2>

    更高级的

    nnoremap <F2> :set invpaste paste?<CR>
    imap <F2> <C-O>:set invpaste paste?<CR>
    set pastetoggle=<F2>

    第一行的作用是在命令模式下,按F2会在状态栏显示paste
    第二行的作用是在insert模式下,按F2会在状态栏显示paste

    四、ThinkPad安装Ubuntu禁用触摸板

      直接按“Fn + F8”  我的是ThinkPad R61i,安装Ubuntu12.04时自动安装了所有驱动,除了“Fn + F5”无线管理器不能用以外。

  • 相关阅读:
    Git 使用vi或vim
    git 添加远程仓库后无法push
    windows下使用IIS创建git服务
    NPOI 操作office、word、excel
    delphi 模拟POST提交数据
    git 用远程覆盖本地
    Delphi中MD5实现方法(转)
    Delphi 操作Ini文件
    Spring系列之——spring security
    Spring系列之——使用模板快速搭建springboot项目
  • 原文地址:https://www.cnblogs.com/lizhishugen/p/2829921.html
Copyright © 2011-2022 走看看